locked
Synctoy.exe command line RRS feed

  • Question

  •  

    I am trying to use the Synctoy.exe command line to create folder pairs. According to the documentation, here are the switches:

     

    -d(left=, right=, name=,operation=Synchronize|Echo|Contribute, [check=yes|no], excluded=,included=) Creates a new folder pair with the specified options:

    left - mandatory, provide absolute path for left folder

    right - mandatory, provide absolute path for right folder

    name - mandatory, provide name of folder pair

    operation - mandatory, specifiy action type for this folder pair

    check - optional, specify whether file contents should be checked for file matching, default is no

    excluded - optional, specifies exclude filter for files, defaults to none

    included - optional, specifies include filter for files, defaults to all

     

    -u Delete one or more folder pairs, no user data will be deleted

     

    Everything works just fine as long as the left and right paths do not have any spaces in them. However, when I try to use a path which has a space in it for one of the folders, this method does not seem to work. I tried to encapsulate with extra quotes but it still won't work. Does anyone know how to get the command line to work with paths that have spaces?

     

    Thanks

    Tuesday, November 4, 2008 12:46 AM

Answers

  • Thanks. I had tried that before but it didn't work. I now realize that I had an extra \ at the end of the path name. When I removed that, the quotes then worked. If I leave it in then it will not process. Strange.

     

     

    Tuesday, November 4, 2008 3:52 PM

All replies

  • Hi,

    donot keep any blank space between the comma and the next parameter, and add quotation marks when there is a space in the direcotry or folder.

     

    like the following one works fine:

    C:\Program Files\SyncToy 2.0>synctoy -d(left="C:\Documents and Settings\Administ
    rator\Desktop\test1",right="C:\Documents and Settings\Administrator\Desktop\test
    2",name=c,operation=synchronize,check=yes)

     

     

     

    Thanks,

    Baoke

    Tuesday, November 4, 2008 12:37 PM
  • Thanks. I had tried that before but it didn't work. I now realize that I had an extra \ at the end of the path name. When I removed that, the quotes then worked. If I leave it in then it will not process. Strange.

     

     

    Tuesday, November 4, 2008 3:52 PM
  • Have you tried using %20 instead of the spaces? I see that a lot in hyperlinks. Let us know how it works - I was not aware of the command line options, this could be really helpful! Thanks.

     

    Tuesday, November 4, 2008 4:15 PM
  • Yes I had tried %20 but that didn't work either. I finally goit it to work by removing the last backslash in the directory path.

     

    Tuesday, November 4, 2008 6:42 PM
  • You can use the original DOS syntax as well.  If its giving you the "length" error, thats what it is referring to.

     

    Documents and Settings --- docume~1

     

    etc..

     

    Friday, November 21, 2008 3:51 PM