Guide
Directory synchronization
Synchronization compares two directories. The direction names the side that changes.
Remote means the server receives your local changes. Delete, if you enable it later, removes remote files that are not on the PC.
Local means the PC receives remote changes. It can overwrite the project you just edited.
Both updates either side. It is the wrong choice when the PC is the only source.
The situation
A local folder and a remote folder should share a set of files, and you do not want a missing file on the source to delete the other side by surprise.
Prerequisites
- One working file Upload and download succeed before you compare a tree.
- Timestamps SFTP is the usual choice. FTP is weaker when the server only supports
LIST. SCP is a poor comparison source because of shell timestamps and daylight-saving time. - A direction Decided before you open the dialog.
- A copy Of anything you cannot replace, if delete might be enabled later.
Run a previewed sync
- Open both folders In Commander, set both panels. In Explorer, choose the local directory in the dialog.
- Commands → Synchronize Local updates the PC. Remote updates the server. Both updates either side.
- Mode Synchronize files is the normal mode. Mirror files also copies older files.
- Preview Leave Preview changes on. Leave Delete files off until the delete list is one you want.
- Checklist Apply it only when every line is expected.
Keeping a remote directory up to date repeats a remote sync as local files change. Point it at a folder you are willing to publish, not at a directory of drafts and credentials.
Example directions
C:\Projects\site edited on the PC, public files in /var/www/html. Direction Remote publishes your newer files. Direction Local overwrites the project with the server. Both is not “my PC is the source.”
Scripts use the same words: synchronize remote, synchronize local, and -preview to list changes without applying them. -delete does nothing in both mode. The script will not ask before replacing files.
Expected result
With preview on and delete off, the chosen side gains missing or newer files and keeps files that exist only there. A website still needs a browser check, because the web root and the synced folder are sometimes different.
Common mistakes
- Reading “Local” as “send my files.”
- Enabling Delete files on the first run.
- Synchronizing a parent folder because the remote home was still selected.
- Trusting an SCP timestamp comparison.
Security
The source folder is copied as it stands, including keys and database dumps if they are in it. Remote delete is not a recycle bin. On S3, delete removes objects, and a folder is only a prefix. Preview against a test directory when the destination is live.
Troubleshooting
If every file looks changed, suspect timestamps. SFTP and FTP MLSD are supposed to use UTC, and some servers still mishandle daylight-saving time. A session log shows the values compared. Remove account details before you share it. An empty checklist usually means the wrong remote directory.
Related resources
Winsaip is an independent educational resource and is not affiliated with or endorsed by the developers of WinSCP.