Delete file after transfer

Please post here if you have problems in using Wing FTP Server.
Post Reply
HorizonsCouncil
Posts: 1
Joined: Sun Oct 08, 2017 11:16 pm

Delete file after transfer

Post 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
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Delete file after transfer

Post 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
Post Reply