Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Queuing files
#9
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
Code:
Copy      Help
,;****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?)


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)