Sub MyFTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
If Success Then
Dim i As Int
Dim SubFolder As String
SubFolder = ServerPath.Replace(DownloadFolderLocation.Replace(" ","_"), "") '
For i = 0 To Folders.Length -1
If Folders(i).Name <> "." And Folders(i).Name <> ".." Then
myFTP.List(ServerPath & "/" & Folders(i).name)
End If
Next
If Files.Length >= 1 Then
AddFileToDownloadList(ServerPath, File.DirApp & "/" & currentIP & "/" & SubFolder, Files) 'add the files to the queue (list) to download
End If
btnDownload.Enabled = True
pbProgress.Visible = False
Else
logWindow.text = "Online folder not found, check spelling..." & ServerPath
End If
Log("Test")
End Sub