开发者

How can I make the batch file wait until another batch file completes execution?

开发者 https://www.devze.com 2022-12-25 19:19 出处:网络
How can I make a batch file wait until another batch file has finished? For example, I have: echo hi >r.txt

How can I make a batch file wait until another batch file has finished?

For example, I have:

echo hi >r.txt
echo some piece of code >>r.txt 

start ar.bat

echo some piece of code >>ar.txt 

I want the code after start ar.bat to 开发者_StackOverflowexecute only after ar.bat finishes executing. I tried without start and it works, but I want to run ar.bat in a separate window.

Is there any method to check whether ar.bat has finished?


Use call ar.bat to do it completely with batch file commands.

Use start /wait ar.bat to get another window and wait for it to complete.

0

精彩评论

暂无评论...
验证码 换一张
取 消