How to run multiple bat files within a bat file


use CALL statement.
eg.
1. Create a bat file : a.bat
DIR
2. Create another bat file : b.bat
DATE
3. Create third bat file : c.bat
a.bat
b.bat

In this case only first bat file is executed. 

To execute both bat files from a single bat file use CALL statement .. i.e. modify c.bat as
Call a.bat
Call b.bat

When not using CALL, the current batch file stops and the called batch file starts executing. It's a peculiar behavior dating back to the early MS-DOS days

Comments

Popular Posts