≡ Menu

Synctoy command line switches

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
{ 13 comments… add one }
  • EAST webmaster November 9, 2011, 11:20 pm

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

  • kolya December 6, 2011, 10:10 am

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

  • Chris February 2, 2012, 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

    • admin February 3, 2012, 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 FilesSymctoySynctoycmd.exe -R MydoscSync.

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

  • Orlando Gautier August 16, 2012, 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?

  • -jc May 4, 2013, 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….

  • Gary July 24, 2013, 1:53 am

    Typo on last line
    SyncTopyCmd -R

    Should be: SyncToyCmd -R

  • andy August 12, 2014, 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.

  • Carol April 24, 2015, 4:12 pm

    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.

  • Anthony September 30, 2015, 4:50 pm

    Is there a way to use the command line to acknowledge any errors that occur during the sync?

  • Bernd Cluever July 19, 2017, 8:14 am

    Is there a command line Option to list the configured pairs?
    To get just the names of the configured sync-pairs?

  • John Dooley September 29, 2018, 7:49 pm

    Is there an argument to run the program hidden from view, or a way to do this using scheduler?

  • Billy May 14, 2019, 9:40 pm

    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?

Leave a Comment