This is an old revision of the document!

Directory Synchronization

This article contains detailed description of synchronizing files. You may want to see simplified guide to the process instead.

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

You can select files and directories for synchronization the same way you select them for file transfer.

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 Direction

There are three possible directions (targets) of synchronization.

With Local direction, changes from remote directory (source) are applied to local directory (target). Only the local directory is modified.

Remote mode is the same as Local, just in an opposite direction: changes from the local directory (source) are applied to the remote directory (target). Only the remote directory is modified.

In Both mode, both local and remote directories can be modified (both can act as both source and target).

Automating Synchronization

To automate synchronization use scripting command synchronize or .NET assembly method Session.SynchronizeDirectories.

Last modified: by 69.146.24.81