Hi,
I'm trying to redirect a cmd based script to a txt file, as it stand it goes...
objShell.Run "cmd /c S:\update1.cmd >>c:\file.txt",1,True
objShell.Run "cmd /c S:\update2.cmd >>c:\file.txt",1,True
This all works ok and sends the output from within the commands to the file but I want to specify the file as a variable so...
objShell.Run "cmd /c s:\update1.cmd >>strFileName",1,True
objShell.Run "cmd /c s:\update2.cmd >>strFileName",1,True
Obviously this doesn't work as it's within "" and using & doesn't work.
How do I get round this?
BTW I can't modify update1.cmd and strFileName with have spaces in the path.
I'm trying to redirect a cmd based script to a txt file, as it stand it goes...
objShell.Run "cmd /c S:\update1.cmd >>c:\file.txt",1,True
objShell.Run "cmd /c S:\update2.cmd >>c:\file.txt",1,True
This all works ok and sends the output from within the commands to the file but I want to specify the file as a variable so...
objShell.Run "cmd /c s:\update1.cmd >>strFileName",1,True
objShell.Run "cmd /c s:\update2.cmd >>strFileName",1,True
Obviously this doesn't work as it's within "" and using & doesn't work.
How do I get round this?
BTW I can't modify update1.cmd and strFileName with have spaces in the path.