Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Other than Winscp, is there a program that can do a sftp file sync 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.


share|improve this question
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
up vote 0 down vote accepted

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:

option batch abort
option confirm off
open s -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"

For details refer to:

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

share|improve this answer
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .