This is an old revision of the document!
Directory Synchronization
WinSCP can synchronize content of local directory with remote one or vice versa or even mutually. Find the function in Commands > Synchronize. Synchronize dialog will appear, where you can select synchronization mode and configure options.
Once you confirm your options, WinSCP will collect list of differences in between the directories. If option Preview changes is enabled, you will be presented with the synchronization checklist, where you can select those synchronization actions you want to actually apply.
Advertisement
Files and directories excluded from transfer are excluded from synchronization too.
Before using the function make sure that WinSCP knows correct timestamps of remote files, to avoid losing data.
If you use WinSCP to synchronize your files only, you can use command-line parameter /synchronize
to quickly open Synchronize dialog.
Synchronization Modes
There are three direction modes for synchronization.
In Local mode, changes from remote directory are applied to local directory. Only the local directory is modified. If a file in the remote directory is newer than the same file in local directory, the local file is updated. Remote files not in the local directory can optionally be downloaded as well (disable this using the option Existing files only). The local files not existing in remote directory are optionally deleted (enable option Delete files).
Remote mode is the same as Local, just in an opposite direction.
In Both mode, both local and remote directories can be modified. The newer files are transfered to the opposite directory. The files not existing in an opposite directory are optionally transfered too (enable option Existing files only). In other words, no files are deleted.
Automating Synchronization
To automate synchronization use scripting command synchronize
.
Advertisement