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