vecino Well-Known Member Licensed User Longtime User Nov 5, 2022 #1 Hi, I need to use SMB for a small project and I'm seeing that it doesn't use "wait for" but it launches "ListCompleted" and "DownloadCompleted", my question is if it can be used somehow something like: B4X: Copy wait for (smb1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile) complete (...) Thanks.
Hi, I need to use SMB for a small project and I'm seeing that it doesn't use "wait for" but it launches "ListCompleted" and "DownloadCompleted", my question is if it can be used somehow something like: B4X: Copy wait for (smb1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile) complete (...) Thanks.
vecino Well-Known Member Licensed User Longtime User Nov 5, 2022 #2 I answer myself. B4X: Copy Wait For SMB1_DownloadCompleted (Url As String, RemoteFile As String, Success As Boolean) Upvote 1
I answer myself. B4X: Copy Wait For SMB1_DownloadCompleted (Url As String, RemoteFile As String, Success As Boolean)
vecino Well-Known Member Licensed User Longtime User Nov 5, 2022 #3 It does not seem to work. B4X: Copy SMB1.ListFiles( cRutaFilesSMB, "*.txt") Wait For SMB1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile) Upvote 0
It does not seem to work. B4X: Copy SMB1.ListFiles( cRutaFilesSMB, "*.txt") Wait For SMB1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile)
vecino Well-Known Member Licensed User Longtime User Nov 5, 2022 #4 Hi, I think I have found the problem, and I don't know if I should open another thread. Sorry if it doesn't go here. Example of the problem: The path to download files is: B4X: Copy cPathRemoteFilesSMB = "smb://192.168.1.99/files/" And the error seems to be because one slash is missing, how can I indicate to you that it is two slashes? java.io.FileNotFoundException: smb:/192.168.1.99/files/01020304.txt: open failed: ENOENT (No such file or directory) Click to expand... The error says: smb:/192... instead of smb://192.... Click to expand... How can I solve it? Thank you. Upvote 0
Hi, I think I have found the problem, and I don't know if I should open another thread. Sorry if it doesn't go here. Example of the problem: The path to download files is: B4X: Copy cPathRemoteFilesSMB = "smb://192.168.1.99/files/" And the error seems to be because one slash is missing, how can I indicate to you that it is two slashes? java.io.FileNotFoundException: smb:/192.168.1.99/files/01020304.txt: open failed: ENOENT (No such file or directory) Click to expand... The error says: smb:/192... instead of smb://192.... Click to expand... How can I solve it? Thank you.
Erel B4X founder Staff member Licensed User Longtime User Nov 6, 2022 #5 vecino said: And the error seems to be because one slash is missing, how can I indicate to you that it is two slashes? Click to expand... This is not the problem. The SMB library implement SMB version 1.0. It is no longer supported on newer versions of Android. There is another library for SMB 2: https://www.b4x.com/android/forum/threads/jcifs-ng-smb-client-smb2.104560/#content Upvote 0
vecino said: And the error seems to be because one slash is missing, how can I indicate to you that it is two slashes? Click to expand... This is not the problem. The SMB library implement SMB version 1.0. It is no longer supported on newer versions of Android. There is another library for SMB 2: https://www.b4x.com/android/forum/threads/jcifs-ng-smb-client-smb2.104560/#content