Automate file synchronization from Folder to SFTP server

Advertisement

matrixebiz
Joined:
Posts:
2

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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

Reply with quote

Advertisement

You can post new topics in this forum