如何从批处理脚本中运行批处理脚本?
收藏

如何从批处理脚本中调用另一个批处理脚本?

I want it to execute in an if statement.

最佳答案

Use CALL as in

CALL nameOfOtherFile.bat

This will block (pause) the execution of the current batch file, and it will wait until the CALLed one completes.

If you don't want it to block, use START instead.

Get the nitty-gritty details by using CALL /? or START /? from the cmd prompt.

    公众号
    关注公众号订阅更多技术干货!