Sub Button1_Click
Try
File.Delete (File.DirRootExternal,"sms.txt")
Catch
Log(LastException)
End Try
GraceStoixeiaStofile
Dim user As String
Dim pass As String
user=EditText1.Text
pass=EditText2.Text
Dim filename As String
filename=EditText3.Text
mysmb.Initialize("mysmb")
mysmb.SetCredentials(user,pass,"")
Dim Geniko As String
Geniko="smb://" & EditText4.text
mysmb.DownloadFile(Geniko,filename,File.DirRootExternal,filename)
awake.KeepAlive(True)
End Sub
edittext1 and edittext2 contain the username and password (user user)
the edittext4 is the share directory of the windows 10 (mobuser-pc/temp)
it does not return any error
B4X:
Sub mysmb_DownloadCompleted (Url As String, RemoteFile As String, Success As Boolean)
' edo stamatv
' Dim myS As String
If Success=False Then
EditText5.Text="Αποτυχία"
Else
EditText5.text=File.ReadString(File.DirRootExternal,EditText3.text)
myClip.clrText
myClip.setText(EditText5.Text)
End If
End Sub
it always return success=false
*** inside the temp directory there is a file sms.txt that I want to read it contant and write at edittext5.text
I have the same problem with windows XP
I try with file explorer (smb protocol) program and I can connect to both windows 10 and window XP and read the file.