Topic "Automate file synchronization from Folder to SFTP server"

Author Message
matrixebiz
[View user's profile]

Joined: 2017-06-27
Posts: 2
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
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
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:

Code:
: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
[View user's profile]

Joined: 2017-06-27
Posts: 2
Okay, thanks I'll check it out

I assume I have to read these threads first to understand how to create the script in the first place?
https://winscp.net/eng/docs/guide_automation
https://winscp.net/eng/docs/scripting
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
Yes, that's correct.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License