This is an old revision of the document!

Keep Remote Directory Up To Date

Keep remote directory up to date is unique feature of WinSCP. With it you may let WinSCP watch for changes in a local directory and WinSCP will automatically reflect the changes on selected remote directory.

Using it, you can, with some limitations, work with local files using your favourite tools and the effect would be, just as if you work with remote files directly. In other words, the feature partially replaces commercial SCP/SFTP drive mapping tools.

Advertisement

Find the function in Commands > Keep Remote Directory Up To Date. Options dialog will appear.

Note that for performance reasons there is a limit of 500 subdirectories to be watched simultaneously.

How It Works

Once you start the function, WinSCP will register to receive notification whenever something changes in selected local directory (and optionally in all its subdirectries). Once you make a change, for example when you save file in your favourite editor, WinSCP will receive notification about the change in respective directory. Then it will perform synchronization of the local directory with corresponding remote directory. Thus your change will be automatically reflected on the remote side.

WinSCP can even (optionally) delete remote files, when you delete local files.

Files and directories excluded from transfer are ignored by the function.

Before using the function you should know that:

  • WinSCP must know correct timestamps of remote files, to avoid losing data.
  • WinSCP will detect that something has changed in the directory only. It won’t know what has changed actually. So it must perform full synchronization of that directory. As a result it may not upload only the file changed just at the moment, but any file that is out of sync. In other words, you should start the Keep remote directory up to date function only, when the selected local and remote directories are completely (or almost completely) synchronized. You can make WinSCP do this automatically for you, by checking option Synchronize on start.
  • When you rename file or directory, WinSCP will see it as removal of one file and addition of another and it will reflect the change on remote directory as such. So it is not recommended to use the function to “rename” large files and directories. You should better do this manually.

Last modified: by martin