Hi all I am trying to create a SyncToy Relationship in vbscript between two folders but first want to check the destintaion exist, and if it does then create the relationship.
So I have done the following
Sub Excel
iF objFSO.FolderExists("\\server\tsprofiles$\" & StrUserName & "\Application Data\Microsoft\Application Data\Microsoft\Office\Excel") Then
WshShell.Run"""c:\program files\synctoy 2.1\synctoy"" -d(left="\\mhralonfs01\tsprofiles$\" & StrUserName & "\Application Data\Microsoft\Office\Excel",right=Char"C:\Documents and Settings\"
& StrUserName & "\Application Data\Microsoft\Office\Excel",name="Excel",operation=Synchronize)"
Else
msgBox ("problem")
end if
End Sub
The FolderExists is fine but....
But the vbscript doesn't like all the extra " and () characters in the synctoy -d command. I have tried replacing the characters with Ascii Characters, SnycToy doesn't recognise them as Ascii characters it sees them as they written i,e Char(40) instead
of (
Does anyone have any thoughts how I can get this to work?
Thanks
Nigel