Private Sub CallingSub
Dim Results As Map = CreateMap()
downloadFile("File1", Results)
downloadFile("File2", Results)
Do While "" = Results.GetDefault("File1", "") Or "" = Results.GetDefault("File2", "")
Sleep(200)
Loop
Log("File1 loaded and " & Results.Get("File1"))
Log("File2 loaded and " & Results.Get("File2"))
End Sub
Private Sub downloadFile(strFile As String, Results As Map)
sf = ftp.DownloadFile(strFile, True, File.DirInternal, strFile)
Wait For (sf) ftp_DownloadCompleted (ServerPath As String, Success As Boolean)
Results.Put(strFile, IIf(Success, "success", "failed"))
End Sub