Synchronize data to FTP with WinSCP

I recently discovered WinSCP, a Free SFTP, FTP and SCP client for Windows. It has a graphical interface, but for me the most important feature is that you can easily script your way to a very fast and automated synchronization system with the software.

First download and install the WinSCP software.

Then, create a txt file somewhere on your computer and use a similar script:
# Automatically answer all prompts negatively not to stall the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
open ftp://user:password@IPaddress
# Change remote directory
cd /myDestinationFolder/myDestinationSubFolder
# Force binary mode transfer
option transfer binary
synchronize remote C:mySourceFoldermySourceSubFolder
# Disconnect
# Exit WinSCP

Then create a bat file in the same directory:
@ECHO off
cd "C:Program FilesWinSCP"
winscp.exe /console /script=C:PathToTxtFileJustCreatedTxtFileJustCreated.txt /log="C:LogPathwinscp.log"

Then you can use TaskScheduler to schedule the bat file and your synchronization process is complete!

2014-10-06 13:57:10

< Back