locked
Cmdline function is unable to handle character ')' in paths? RRS feed

  • Question

  • Hi folks,

    I have a network share that contains some problematic characters like & and ).  I suppose I figured out how to handle the &, but ) is tuff. It seems to me that SyncToy.exe stops prosessing (internally) the cmdline after the first ) character, even if that character is in a string between " " characters like in "C:\TEST(1)DIR".

    The popup will show a path that has been cut too early.  Here's a example with folder names 1 and (2):  "Failed to construct a valid folder pair from the string: (left=D:\X\1 ,right=D:\X\22(2)22,name=Test1,operation=echo,check=no). Could not locate right folder D:\X\22(2\."

    I can't change the network share name, because it is defined elsewhere, so this is some sort of a problem atm : ).

    cheers..

    Wednesday, March 24, 2010 3:28 PM

Answers

  • It seems that symlinks can help do some work around.

    Take your "D:\X\22(2)22" sample for example, if your OS supports symlinks, you can try the following steps:

    1. Download Junction.exe provided in http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx if necessary.
    2. Open a cmd prompt window and locate to the folder where you had placed Junction.exe.
    3. Run "junction.exe D:\X\right D:\X\22(2)22" in the cmd window (there should be no folder or file named "D:\X\right").
    4. Locale to SyncToy folder.
    5. Run "SyncToy.exe -d(left=D:\X\1,right=D:\X\right,name=Test1,operation=echo,check=no)" in cmd folder.

    Now you can sync the folder pair "Test1" to sync the two folders without renaming the D:\X\22(2)22 folder. The "D:\X\right" will not take any additional disk space at all, just consider it as a shortcut to "D:\X\22(2)22".

    Hope this can help. (Any way, the bug is still need to fix.)

    Thanks


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by asathatsme Thursday, March 25, 2010 8:01 AM
    Thursday, March 25, 2010 2:51 AM

All replies

  • Hi asathatsme,

    Sorry about the inconvenience. We have noticed this bug and is trying to do something.

    There seems no work around so far. I am trying if folder mapping technologies, such as symlinks, can help and will share the conclusion.

    Thanks


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, March 25, 2010 2:12 AM
  • It seems that symlinks can help do some work around.

    Take your "D:\X\22(2)22" sample for example, if your OS supports symlinks, you can try the following steps:

    1. Download Junction.exe provided in http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx if necessary.
    2. Open a cmd prompt window and locate to the folder where you had placed Junction.exe.
    3. Run "junction.exe D:\X\right D:\X\22(2)22" in the cmd window (there should be no folder or file named "D:\X\right").
    4. Locale to SyncToy folder.
    5. Run "SyncToy.exe -d(left=D:\X\1,right=D:\X\right,name=Test1,operation=echo,check=no)" in cmd folder.

    Now you can sync the folder pair "Test1" to sync the two folders without renaming the D:\X\22(2)22 folder. The "D:\X\right" will not take any additional disk space at all, just consider it as a shortcut to "D:\X\22(2)22".

    Hope this can help. (Any way, the bug is still need to fix.)

    Thanks


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by asathatsme Thursday, March 25, 2010 8:01 AM
    Thursday, March 25, 2010 2:51 AM
  • Thank You for your efforts, JiGuang.

    I'm a big fan of Far Manager because of its usability and macroability, and Far supports Junctions !!  Even delete function works correctly (not accidentally deleting the source data if junction point is deleted by a mistake).  My own programs also use junctions for space savings.. : )

    I also tried junctions, and those were my last resort.  They do bypass the problem here but the result is not "beautiful" ; )

    Thursday, March 25, 2010 8:01 AM