Synctoy command line switches

by admin on February 20, 2011

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 Files\SyncToy 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 Files\SyncToy 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

{ 8 comments… read them below or add one }

EAST webmaster November 9, 2011 at 11:20 pm

Where is the command to run synchronization for all folder pairs?

Reply

kolya December 6, 2011 at 10:10 am

how to exclude a subfolder or a file via the command line (with wich switches) ???
Thanks!

Reply

Chris February 2, 2012 at 5:36 am

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

Reply

admin February 3, 2012 at 1:54 pm

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 Files\Symctoy\Synctoycmd.exe -R MydoscSync.

Synctoycmd.exe will be installed on your computer along with Synctoy.

Orlando Gautier August 16, 2012 at 1:00 pm

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?

Reply

-jc May 4, 2013 at 9:03 pm

@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….

Reply

Gary July 24, 2013 at 1:53 am

Typo on last line
SyncTopyCmd -R

Should be: SyncToyCmd -R

Reply

andy August 12, 2014 at 1:06 pm

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.

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: