Page 1 of 1

Delete file after transfer

Posted: Sun Oct 08, 2017 11:22 pm
by HorizonsCouncil
apologies for the silly question, but I have been looking for (unsuccessfully) anything that will "automatically" delete a file from the ftp server after it has been successfully transferred to my local machine. Is there such a setting?

I am currently having to transfer files, then use a second process to delete them after, and its becoming tiresome :)

Advice greatly appreciated.

Chris

Re: Delete file after transfer

Posted: Tue Oct 10, 2017 11:09 am
by FTP
OK, you can add the following Lua script into the event "OnFileDownloaded":

Code: Select all

local filepath = "%PathName"
if c_FileExist(filepath) then
    c_RemoveFileDir(filepath)
end