Other than WinSCP, is there a program that can do an SFTP file synchronization of folders in Windows? I'd like to find a simple way to add directories to be backed up to my SFTP server. I'd like to run it as a scheduled task each night.

I am able to do this with WinSCP, but since my scripting is horrible, I have about 10 configuration files for each transfer and adding new ones is a paid in the neck.

  • Do you have rsync on the server (many Linux servers do)? If so, try using something like this. It's likely to be considerably faster and possibly easier to setup. – wingedsubmariner Nov 27 '13 at 5:10
  • Yes, I've tried it but it has a 260 or so character limit and this causes major issues. It's hard for me to believe that people rely on this program when it has such an obvious limitation. You just can't trust it. – user277244 Nov 27 '13 at 6:25

What about making your WinSCP script easier to maintain?

I suppose all you need is to put one synchronize command per directory to your script. That does not sound too difficult to maintain.

I.e. your script (script.txt) would be like:

open sftp://user:password@example.com -hostkey="server_hostkey"

# one synchronize command per directory
synchronize remote C:\local_directory1 /home/user/remote_directory1
synchronize remote C:\local_directory2 /home/user/remote_directory2
synchronize remote C:\local_directoryN /home/user/remote_directoryN


And you add a task to Windows Scheduler with command-line like:

"C:\Program Files\WinSCP\WinSCP.exe" "/script=path_to_script\script.txt" "/log=path_to_script\script.log"

Ideally also add the /ini=nul to command-line to isolate your script from environment.

  • Thanks. I will try that. I was using one file per command, I'll give that a shot. – user277244 Nov 28 '13 at 5:05
  • Did this help you? – Martin Prikryl Dec 4 '13 at 17:45
  • Yes, but actually, looks like I may need to rsync over ssh as I have a new client with 1.4 million files to sync. It took winscp 24 hours to do the sync. No way to do a daily backup when it takes all day. – user277244 Dec 8 '13 at 5:12
  • Was that full initial sync? Did you try second incremental sync? – Martin Prikryl Dec 8 '13 at 6:45
  • Full initial sync took 36 hours. Second incremental sync took 24 hours. What do big companies use when they have this many files? Rsync can't be the only option. Too much stuff to install inside windows if I can avoid it. – user277244 Dec 9 '13 at 4:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.