InterviewSolution
| 1. |
Solve : batch file not running all commands? |
|
Answer» I'm trying to run several COMMANDS in a batch file. However, the first command brings up a new instance of cmd.exe in the same window (fine), then stops there and doesn't run the other commands in the batch file. Is this not possible? To enable delayed variable expansion in a batch file, you can place this line before the applicable section of code Thanks for the reply. Yes, I tried it and the code runs as if enable delayed expansion is not set to 'on'. I tested by OPENING up a cmd window manually and entering the code with the original (cmd /v) line and it works. Then I re-ran the code with the suggested line and noted the results. Then I re-ran it for a third time without either line and I get the same result as if I ran it by setting the value locally(setlocal enabledelayedexpansion). If I use 'cmd /v', is there a way that I can force the next line of code to run instead of having to enter it myself? Sloopy Hmmmm... without actually seeing the code in question, this becomes a bit of a guessing game. Quote from: Dias de verano on October 12, 2008, 11:39:18 AM Hmmmm... without actually seeing the code in question, this becomes a bit of a guessing game. The code calls another program and unfortunately, that is where the problem occurs. I guess for some reason it only works with 'cmd /v' and not 'setlocal enabledelayedexpansion'. I don't have access to the code for the other program, so I'll have to do some more digging to find a work around. Thanks for your help, SloopyHi I also got this same problem with me but still i did'nt get any solution of this please SUGGEST me about this. _______________________________________ ___________ Capture One Auto Transport |
|