[3 edit]
maybe : " If Wait For is later called with the same event then the new sub instance will replace the previous one."
so :
I'll study : https://www.b4x.com/android/forum/threads/ftp-example-using-a-download-queue.39141/
[2 edit]
Need to declare in the sub the FTP object .... (and not once globally)
Next error : display only folders/files for the last call ...
Any ideas ?
thks
[1 edit]
Hi,
I get this error : "java.net.ConnectException: Connection timed out: connect" when using the following code
Obviously, the directories exist on the server ...
server : vsftpd, on Azure, no special config
I'm probably missing something ... dont understand what
Thanks in advance for your help !
maybe : " If Wait For is later called with the same event then the new sub instance will replace the previous one."
so :
I'll study : https://www.b4x.com/android/forum/threads/ftp-example-using-a-download-queue.39141/
[2 edit]
Need to declare in the sub the FTP object .... (and not once globally)
Next error : display only folders/files for the last call ...
Any ideas ?
thks
[1 edit]
Hi,
I get this error : "java.net.ConnectException: Connection timed out: connect" when using the following code
click function:
Private Sub btnCharge_Click
Private nom As List
nom.Initialize
nom.Add("BOURGEAT")
nom.Add("BRC")
nom.Add("CODIGEL")
'this code raise an error ...
For Each n As String In nom
download(n,"","")
Next
'only 1 call to download is OK
'download(nom.Get(0),"","")
'working too ...
'download("","","")
End Sub
called function:
Sub download(f As String,p As String, nl As String)
Private localPath As String = "/P6_FOURNISSEURS/"&f
Log("localPath :"&localPath&" ("&p&"/"&nl&")")
ftp.Initialize("ftp", "X.X.X.X", 21, "myUser", "myPSWD")
'ftp.TimeoutMs = 100000
'ftp.PassiveMode=True
ftp.List(localPath)
Wait For FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
If Success Then
Log("succes")
Log("Dirs :")
For Each dir As FTPEntry In Folders
Log(dir.Name)
Next
Log("filess ")
For Each file As FTPEntry In Files
Log(file.Name)
Next
ftp.close
Else
Log("Erreur : "&ServerPath)
End If
Log("Finish")
End Sub
Obviously, the directories exist on the server ...
server : vsftpd, on Azure, no special config
I'm probably missing something ... dont understand what
Thanks in advance for your help !
Last edited: