Differences

This shows you the differences between the selected revisions of the page.

task_keep_up_to_date 2005-04-12 task_keep_up_to_date 2025-09-17 (current)
Line 1: Line 1:
-====== Keep Remote Directory Up To Date ====== +====== Keep Remote Directory up to Date ====== 
-//Keep remote directory up to date// is unique feature of WinSCP. Using it you may let WinSCP watch for changes in a local directory and WinSCP will automatically reflect the changes on selected remote directory.+//Keep remote directory up to date// is a unique feature of WinSCP. With it you may let WinSCP watch for changes in a local directory and have it automatically reflect the changes on the 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.+Using it, you can, with some limitations, work with local files using your favorite tools and the effect would be as if you were working with remote files directly. In other words, the feature partially replaces commercial remote directory drive mapping tools.
-Find the function in //Commands > Keep Remote Directory Up To Date//. [[ui_keep_up_to_date|Options dialog]] will appear.+Find the function in //Commands > Keep Remote Directory up to Date//. The [[ui_keepuptodate|Options dialog]] will appear.
-===== How It Works ===== +If you use WinSCP to synchronize your files only, you can use command-line parameter ''[[commandline#operations|/keepuptodate]]'' to quickly open [[ui_keepuptodate|options dialog]].
-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 [[task_synchronize_full|synchronisation]] 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.+Note that you will be warned if number of subdirectories to be watched exceeds 500. Watching for changes in large number of directories can significantly degrade the performance of your computer.
-Files and directories [[ui_pref_transfer#other_options|excluded from transfer]] are ignored by the function.+===== [[how_it_works]] How It Works ===== 
 +Once you start the function, WinSCP will register to receive notification whenever something changes in the selected local directory (and optionally in all its subdirectories). Once you make a change, for example when you save file in your favorite editor, WinSCP will receive notification about the change in the respective directory. Then it will perform [[task_synchronize_full|synchronization]] of the local directory with the 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. 
 + 
 +You can select files and directories for to be kept up to date the same way you [[ui_transfer_custom#other|select them for file transfer]].
Before using the function you should know that: Before using the function you should know that:
-  * Before using the function make sure that WinSCP knows correct timestamps of remote files, to avoid losing data. +  * WinSCP must know the correct [[timestamp|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 synchronisation 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) [[task_synchronize_full|synchronised]]. +  * WinSCP will only detect that **something** has changed in the directory; it won't know what the specific change was. So it must perform a full synchronization of that directory. As a result it may upload not 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 already completely (or almost completely) [[task_synchronize_full|synchronized]]. You can make WinSCP do this automatically for you, by checking option //[[ui_keepuptodate#synchronize_options|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.+  * When you rename a 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 do this [[task_rename|manually]].
 +===== Automation =====
 +For automation, use scripting command ''[[scriptcommand_keepuptodate|keepuptodate]]''.

Last modified: by martin