We can create and synchronize folder pairs from windows command line using Synctoy.You can find syntax below.
Creating a folder pair for synchronization from windows command line
The command to create a new folder pair is
Synctoy -d(left=<left_folder_path>, right=<right_folder_path>, name=<folder_pair_name>, operation={synchronize,echo,contribute})
(The arguments user need to provide are enclosed in braces.)
We can also supply other parameters specifying if we want to exclude files of any type etc..but the above one is the basic command to create a new folder pair.
Example to create synchronization between the folders f:folder1 and f:folder2 we can run the below command.
C:Program FilesSyncToy 2.0>SyncToy.exe -d(left=f:folder1,right=f:folder2,name=pair,operation=synchronize)
Note that there should not be any space after ‘,’ in the curly braces. Otherwise you would get syntax error.
Synchronizing folder pair from command line
When we install Synctoy we also get Synctoycmd.exe which can be used to invoke synchronization of folder pairs from command prompt. You can find SyncToyCmd.exe in the synctoy installation folder. (Usually it will be in C:Program FilesSyncToy 2.0 )
To run synchronization for a folder pair we need to run the below command:
SyncToyCmd -R folder_pair_name
Example: To do synchronization for folder pair named pair1, we need to run the below command.
SyncToyCmd -R pair1
Below is the command to run synchronization for all folder pairs:
SyncToyCmd -R
Where is the command to run synchronization for all folder pairs?
how to exclude a subfolder or a file via the command line (with wich switches) ???
Thanks!
Hi, i am trying to set up a scheduled task to run Sync toy 2.1 so i can back up My Documents to my new NAS Server where i want all data saved. I set up scheduled task and it says “The ability to execute folder pairs from the command line (-R Option) is now available from SyncToyCmd.exe How can you set this up?
Thanks Chris
First create a folder pair using the command explained in the post or using Synctoy GUI. Let’s say you named it MydocsSync.
now in your scheduled task specify the command as C:Program FilesSymctoySynctoycmd.exe -R MydoscSync.
Synctoycmd.exe will be installed on your computer along with Synctoy.
Hi, i am trying to set up a scheduled task to run Sync toy 2.1 so i can back up several folders to an external disk where i want all data to be saved. I set up scheduled task in Windows Server 2003 and it says “The ability to execute folder pairs from the command line (-R Option) is now available from SyncToyCmd.exe How can you set this up?
@Orlando Gautier
you execute a synctoy command from the task scheduler. simply launch the wizard in task scheduler (create basic task), set it to launch a program, point it to the synctoycmd.exe file, and add your -R “Paired_sync_name” to the arguments field.
use the quotes around the folder pair if you used spaces….
Typo on last line
SyncTopyCmd -R
Should be: SyncToyCmd -R
Thank you for the clear explanation! I have used SyncToy for a while, and wanted to run as a scheduled task to automate the process, and you pointed me in the right direction.
Downloading SyncToy 2.1 went great. BUT there is NO icon to click to begin using SyncToy. I’m using windows 8.1. I’ve searched in the programs, found it there; but still can’t make it work on this computer. Any ideas of something else I need to do? Thanks for your help.
Is there a way to use the command line to acknowledge any errors that occur during the sync?
Is there a command line Option to list the configured pairs?
To get just the names of the configured sync-pairs?
Is there an argument to run the program hidden from view, or a way to do this using scheduler?
Hi, i have used synctoy for many years as a scheduled task but it recently stopped running with a return code of 2147942401 and no matter where i look i cannot find a reference to this code. Also it just starts, hits the return code and ends.
any suggstions please?