How to call two parties from the third?

When my Windows Batch package (.bat) calls the other two BAT files, it exits after the first.

How to make them run both of them?

+4
source share
2 answers

use call

eg. in the calling batch file:

 call batch1.bat call batch2.bat 

(also, some more background here .)

+7
source

In addition to using call as mikej notes, if you need to return an error code from one of the batch files, use

 exit /b 0 

I think that if the last command launched in a batch file returns a non-zero error level, then this is returned as the default error level of the command file itself.

+3
source

All Articles