Running Program cmd
Posted: Tue Sep 22, 2009 12:29 pm
Hi again,
I may have found a bug? Not sure, but I know for sure what I'm trying to do is not working.
I'm using the Run Program statement and trying to run the command,
cmd /c xcopy /e "$TARGETDIR$\\Config" "$TARGETDIR\\Backup $VERSION\\Config\\" as such:
This does not seem to work. I tried doing this:
it works.
Why is an intermediate variable necessary? And please fix.
Thanks,
Kenneth
P.S. Also when I add a message box to show the command, it shows the following:
---------------------------
Test
---------------------------
cmd /c xcopy "C:\\\\TestApp\\Config" "C:\\\\TestApp\\Backup 3.3\\Config\\"
---------------------------
OK
---------------------------
The code for the above message box is:
MessageBox: Test, cmd /c xcopy /e "$TARGETDIR$\\Config" "$TARGETDIR\\Backup $VERSION\\Config\\"
There seems to be a double slash for C:\\\\
I may have found a bug? Not sure, but I know for sure what I'm trying to do is not working.
I'm using the Run Program statement and trying to run the command,
cmd /c xcopy /e "$TARGETDIR$\\Config" "$TARGETDIR\\Backup $VERSION\\Config\\" as such:
Code: Select all
Run Program cmd /c xcopy /e "$TARGETDIR$\\Config" "$TARGETDIR\\Backup $VERSION\\Config\\" (WAIT)
Code: Select all
Set Variable TEST to /c xcopy /e "$TARGETDIR$\\Config" "$TARGETDIR\\Backup $VERSION\\Config\\"
Run Program cmd $TEST$ (WAIT)
Why is an intermediate variable necessary? And please fix.
Thanks,
Kenneth
P.S. Also when I add a message box to show the command, it shows the following:
---------------------------
Test
---------------------------
cmd /c xcopy "C:\\\\TestApp\\Config" "C:\\\\TestApp\\Backup 3.3\\Config\\"
---------------------------
OK
---------------------------
The code for the above message box is:
MessageBox: Test, cmd /c xcopy /e "$TARGETDIR$\\Config" "$TARGETDIR\\Backup $VERSION\\Config\\"
There seems to be a double slash for C:\\\\