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

You can share your Lua Scripts with everybody here.
Post Reply
MCR1987
Posts: 1
Joined: Thu May 17, 2018 1:53 pm

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

Post by MCR1987 »

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

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

Post by FTP »

You can use such Lua function:

os.rename("OldFilePath", "NewFilePath")
Post Reply