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, synchronization will start. Whenever WinSCP finds some change, it can optionally ask you for confirmation (option Preview changes).

Files and directories excluded from transfer are excluded from synchronization too.

Advertisement

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

Last modified: by 70.28.70.162