none
Create folder pair to exclude system and hidden files via command line RRS feed

  • Question

  • I am looking to deploy SyncToy 2.1 to a large number of computers as a tool to backup their profile folder to another drive.  I currently have the following command in a batch file to create the folder pair on their local machine to their h-drive:

    "C:\Program Files\SyncToy 2.1\SyncToy.exe" -d(left=%USERPROFILE%,right=H:\ProfileBackup,name=Contacts,operation=echo)

    The disadvantage to this is that when the folders are synced, it is copying ALL the files/folders, including the hidden and system files/folders.  When I create the folder pair in the application GUI, I have the option to exclude hidden and exclude system files under the "Options for this folder pair", but I have not found a way of doing this via the command line.  I had considered creating multiple folder pairs for each sub-folder under the profile (contact, documents, downloads, etc), but that will exclude any documents that are in the root of the profile folder.  Any suggestions?

    Thursday, May 5, 2011 5:40 PM

All replies

  • I have something for you to consider. It is not a pretty solution but you may find it useful if it works for you.

    Try creating a job in the GUI and then copying this file to the rest of the computers.

    %homepath%\AppData\Local\Microsoft\SyncToy\2.0\SyncToyDirPairs.bin

    After this you can open synctoy on the computers and the job is there.

    You will see it as 'Last run at: Not run yet' and when you try Preview you will get a 'Folder Pair endpoint does not exist' message but you just choose Yes to do the initial sync before the Preview and then you can Run if you want to.

    After that you can use SynToyCMD.exe -R to run the job from the CMD prompt or as a scheduled job.

    Hope this helps.

    Don

     

     

    Wednesday, November 2, 2011 4:04 PM