02-05-2011, 08:09 PM
Cool, thanks.
Any ideas on how to automatically delete the successfully uploaded files from the local "Queue" directory (directory will always be the same, btw) and leave the ones that failed?
Can it be incorporated in the FilePut section upon successful callback? Here is the code I am using there:
Macro exec_ftp_queue
Or do I need to do some directory operations after the whole list is processed (like move out the failed files to temp directory, delete the contents of the Queue directory and move failed back?)
Any ideas on how to automatically delete the successfully uploaded files from the local "Queue" directory (directory will always be the same, btw) and leave the ones that failed?
Can it be incorporated in the FilePut section upon successful callback? Here is the code I am using there:
Macro exec_ftp_queue
,;****now upload***
,int failed=0
,err-
,;...
,Ftp f.Connect(ftp_server ftp_username ftp_password)
,if(!f.DirSet(ftp_directory)) xe.AddRowSA(-1 2 &s1) ;; on directory set error, relist failed file/profile to row (this error not caught by Gintaras err- code
,f.FilePutWithProgress(local_file "")
,;...
,err+ failed=1
,if(failed) xe.AddRowSA(-1 2 &s1) ;; on any other error, relist failed file/profile to row
Or do I need to do some directory operations after the whole list is processed (like move out the failed files to temp directory, delete the contents of the Queue directory and move failed back?)