Re: [BATCH WORLD] Calling a bat within a bat
- You can either add an exit command as the last line of the batch file as
suggested. This may not be the most elegant solution since it will close
the command window when running under other circumstances. This may be
undesirable. I like better the following solution:
start "" /belownormal /wait cmd.exe /C c:\batch\cleantemp.bat
Why do you need to open a new window? If you don't you can just do
"cmd.exe /C c...etc". If you don't need another command window, you could
simply do call c:\batch\cleantemp.bat. In this last case it would not run
in belownormal priority.
Hope this helps.
Gary Kuznitz wrote:
> I have a small problem that I would like to solve. I have a bat file that
> this line in it:
> Start "" /belownormal /wait C:\Batch\CleanTemp.bat
> The original bat file opens a cmd window that stays open. (That's good)
> The line opens another cmd window and it runs. When it's done running I
> to close the second window for the first window to continue.
> I would like to either run the line in the first window so it will
> when it finishes or find a way to close the second window automatically
> when it
> Thank you,
> Gary Kuznitz
View this message in context: http://www.nabble.com/Calling-a-bat-within-a-bat-tp18017574p18975371.html
Sent from the Batch World mailing list archive at Nabble.com.