Synchronize remote ftp folder with local using Win

2019-04-02 15:34发布

问题:

I want to synchronize a remote ftp folder with my local folder every morning at 6am. Is there a way to automate this WinSCP so that I dont have to use Windows Scheduler?

回答1:

Create a batch file

set winscp=C:\WinSCP\WinSCP.com

echo option batch continue > script.tmp

echo option confirm off >> script.tmp

echo open ftp.example.com >> script.tmp

echo synchronize remote C:\local\folder /home/remote/folder >> script.tmp

echo exit >> script.tmp

%winscp% /script=script.tmp

del script.tmp