Sub PostAllFiles As Boolean
Dim MyList As List
MyList.Initialize 'initialize list so it is ready for a new task
Dim MyFile As String
MyList=File.ListFiles(File.DirRootExternal & "/.temp/")
For i=0 To MyList.Size-1
MyFile=MyList.Get(i)
PostFile(File.DirRootExternal & "/.temp/",MyFile)
Next
Return True
UploadInProgress = False
End Sub
Sub PostFile(Dirstr As String,Filestr As String)
'Add files
FTP.UploadFile(Dirstr, Filestr,False, "/" & Filestr)
FTP.CloseNow
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = True Then
File.Delete(File.DirRootExternal & "/.temp",ServerPath)
End If
If Success = False Then Log(LastException.Message)
End Sub