[Ham-Computers] RE: batch file help needed
Hsu, Aaron (NBC Universal)
aaron.hsu at nbcuni.com
Thu Oct 30 20:35:41 EST 2008
.BAT files run synchronously and Windows waits for each command to complete before processing the next command. With Windows, you can use the "start" command in .BAT files to start an app in a new window and the batch will continue on to the next line without waiting (unless you specify the "/wait" switch). You can get the general syntax of the "start" command by typing "start /?" at a command prompt. In this case, in your batch file, this is how I would use it:
start "" "run me 1.bat"
start "" "run me 2.bat"
start "" "run me 3.bat"
and so on. The first set of double-quotes is due to how the START command works - it uses whatever it finds in the first set of quotes it uses as the name of the window that opens (if it's a DOS app). Also note that if it's a DOS app you'll need an "exit" at the end of each .BAT file you call in order to close the window once the batch closes (if you're STARTing a Windows app, no need for this).
It's possible to run the batch asynchronously in the same command prompt window (without opening a new one) by adding a "/B" to each line. For example:
start "" /B "run me 1.bat"
However, this leads to problems with "nested" command shells - each "start" opens a new shell within the command prompt and, if you don't keep track of them, can cause issues. I wouldn't recommend it unless you know what you're doing - you can lock-up the command prompt quite easily this way.
Hope this helps!
73,
- Aaron, NN6O
-----Original Message-----
Sent: Thursday, October 23, 2008 1:00 PM
Subject: Re: [Ham-Computers] batch file help needed
The program is called internally by the DXLabs suite. It is one component of an 8-application integrated program. It also will function independently of DXLabs and work with other programs. By using the batch file, I can start up these other applications with one click, instead of starting each on separately.
73
Dave KB3MOW
More information about the Ham-Computers
mailing list