Hi,I am trying to produce a command line to be executed by/within at AT.exe scheduled task, using a variable which is populated within a SSIS 2008 script editor. I have 2 variables:User::GloVar is a read only variableUser::Arguments is a read/write variableDts.Variables("User::GloVar").Value = "ServerName1"The script task: Imports SystemImports System.DataImports System.MathImports Microsoft.SqlServer.Dts.RuntimePublic Sub Main()Dts.Variables("User::Arguments").Value = "Cmd.exe /C \\" + Dts.Variables("User::GloVar").Value.ToString() + "\production\exe\Sched.exe /u:" + """\\ServerName2\Production\Production Files""" + " /XX output.fil"Dts.Variables("User::Arguments").Value = Replace(Dts.Variables("User::Arguments").Value.ToString(), "Files\", "Files")Dts.Variables("User::Arguments").Value = Replace(Dts.Variables("User::Arguments").Value.ToString(), "u:\", "u:")End Sub
I need the output to be (hence the Replace functions):Cmd.exe /C \\\\ServerName1\\production\\exe\\Sched.exe /u:"\\\\ServerName2\\Production\\Production Files" /XX output.fil
However, I'm getting the following, which has 2 additional backslash characters... 1 after "u:"1 after "Files" Cmd.exe /C \\\\ServerName1\\production\\exe\\Sched.exe /u:\"\\\\ServerName2\\Production\\Production Files\" /XX output.fil
Any ideas how I can remove them? Maybe I'm not using the Replace functions correctly, or can this can be done using another toolbox item.Thanks in advance,Neal Wright