Lua Script to move all files from a folder to a SFTP server

You can share your Lua Scripts with everybody here.

Lua Script to move all files from a folder to a SFTP server

Postby MCR1987 » Thu May 17, 2018 1:58 pm

Hi,

I'm looking for a script that will allow my Wing FTP task to move all files from a single network folder to a folder on my SFTP-server. Does anyone have an example for me?

The task would run every 10 minutes and should move (not copy) the files.

Thank you in advance.
MCR1987
 
posts 1
 
joined Thu May 17, 2018 1:53 pm

Re: Lua Script to move all files from a folder to a SFTP ser

Postby FTP » Fri May 18, 2018 2:26 am

You can use such Lua function:

os.rename("OldFilePath", "NewFilePath")
FTP
Site Admin
 
posts 1601
 
joined Tue Sep 29, 2009 6:09 am


Return to Lua scripts

Who is online

Users browsing this forum: No registered users and 2 guests