Private Sub lbl_upload_Click
Dim folderExists As Boolean=False
Dim ftp As FTP
VacuumToaFile
If File.Exists(xui.DefaultFolder,"backup.db")=False Then Return
ftp.Initialize("FTP","ftp.xxxxxxxx.xx",21,"xxxxxxxxxxxxx","xxxxxxxxxxxxxxx")
Dim ftp_list As Object= ftp.List("/")
Wait For (ftp_list) ftp_ListCompleted(ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log("Success:"&Success)
Log(ServerPath)
Log(Folders.Length)
If Success Then
For Each f As FTPEntry In Folders
Log(f)
If f.Name=cui Then
folderExists=True
End If
Next
End If
.....