none
Creating SyncToy Folder Pairs via Command Line?

    Question

  • We're utilizing SyncToy 2.1 to backup directories on users' desktop PCs to a server.  We then back up that server onto tape.

    The drive on the server that housed these backups recently failed and had to be replaced.  And unfortunately, when we replaced the drive, SyncToy only pulled files from the desktops that had been updated since the last SyncToy synchronization.  We need to re-pull everything.

    We weren't able to find a way to re-perform an initial sync for our existing folder pairs, so we just wiped them out with the intention of recreating them.  We're looking to script the recreation of the pairs rather than create them manually in the SyncToy GUI though.  (There's more than 100 pairs to be created, and each one takes a while using the GUI.  Plus, we'd like to have the script available, just in case something like this happens again.)

    Here's the syntax we're using (where [machinename] is the name of a PC on our network that the user account on the server running SyncToy has permissions over):
    "C:\Program Files\SyncToy 2.1\SyncToy.exe" -d(left="\\[machinename]\c$\users", right="h:\backups\[machinename]", name="[machinename]", operation="contribute", excluded="*.iso;*.mp3;*.wma;*.wmv;*.tmp;*.mdmp;*.hdmp;*.vhd")

    When executing this command, synctoy.exe starts, then immediately throws the following error:
    Failed to construct a valid folder pair from the string: (left=\\pc1\c$\users,.  Invalid folder pair - one endpoint is contained within the other.  Please select a different folder to continue.

    We thought that the error might stem from using a UNC path in the left folder (even though we're able to create folder pairs using UNC paths in the SyncToy GUI), but we weren't even able to get a local to local folder pair set up via command line.  When we tried, we got the same error.

    Any help would be greatly appreciated.  If you need any additional information, please don't hesitate to ask!
    Thursday, August 19, 2010 3:26 PM

All replies

  • Hi,

           Please remove any blank in your create folder pairs string. Then have a try. Then it will work well. I have had a try.

    This is by design, but the error message gave some misleading to you, sorry for this. Will file a bug to correct the misleading message issue.

     

    Thanks,

    Ping


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Ping Lu Friday, August 27, 2010 4:09 AM
    Friday, August 27, 2010 4:08 AM