how to run multiple batch files in serial, in windows command line environment

后端 未结 5 1538
南笙
南笙 2020-12-20 11:22

I have a batch file,

bat1.bat
bat2.bat

but it stops at the end of bat1

any clues?

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-20 11:35

    This can happen if bat1.bat stops abnormally (other than just running to the end, like calling exit) and you can work around this by using a fresh cmd.exe to run each bat file:

    start /b /wait bat1.bat
    start /b /wait bat2.bat
    

    You could omit it for the last one if there won't follow commands in you bat file.

提交回复
热议问题