Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Yes, that's correct.
martin

Re: Automate file synchronization from Folder to SFTP server

Few options:

1) Use keepuptodate command instead of synchronize
https://winscp.net/eng/docs/scriptcommand_keepuptodate

2) Loop the WinSCP script in a batch file:

:retry

winscp.com /script=...
timeout /t 10
goto retry


For a similar task (just an opposite direction), see:
https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date#scripting

3) To avoid reconnect for each retry, use PowerShell script with WinSCP .NET assembly instead of simple scripting:
https://winscp.net/eng/docs/library_powershell

Again, for a similar task, see:
https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date
matrixebiz

Automate file synchronization from Folder to SFTP server

Hello, can anyone please provide me the instructions on how to synchronize a folder on my Windows 7 computer whose contents are constantly changing (so will need to loop the script) with my SFTP server.

Thank you