SyncToy using ObjShell.SpecialFolders("MyDocuments") RRS feed

  • Question

  • Hi!

    I'm trying to use SyncToy in a VBS script, where will copy the content of the users MyDocuments to a network share. Im using ObjShell.SpecialFolders("MyDocuments") to find the users MyDocument folder.

    specialFolders = ObjShell.SpecialFolders("MyDocuments")

    Then in the VBS I call specialFolders in the SyncToy part. I have a sub shell/cmd) to call SyncToy program with and it works.

    Here is the SyncToy part og the VBS

    shell "C:\SyncToy\SyncToy.exe -d(Left=" & specialFolders & ",Right=U:\" & StrUsername & "\" & StrPCname & "\,name=ege,operation=Echo)"

    shell """C:\SyncToy\SyncToyCmd.exe"" -Rege"

    When I run it it starts the SyncToy and then shuts it down right a way, if I put in Left=C:\Temp then it works.

    Is it because SyncToy can't read the specialFolders?

    I'm using SyncToy 2.1 on windows XP SP3

    Monday, May 10, 2010 12:10 PM

All replies

  • I am not farmiliar with shell script very well. But for your problem, I think while you use SyncToy.exe to create folder paire, SyncToy will consider  "& specialFolders &" as the folder path but not the real path string for "MyDocuments", that is why this error happened.




    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, May 14, 2010 9:11 AM