如何从批处理脚本中运行批处理脚本? [英] How do I run a batch script from within a batch script?

查看:148
本文介绍了如何从批处理脚本中运行批处理脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



我希望在

使用 CALL

  CALL nameOfOtherFile.bat 

这将阻止(暂停)当前批处理文件的执行,它将等待 CALL 完成。



如果你不想阻止,使用 START



使用 CALL /? START /? / code>从cmd提示符。


How do I call another batch script from within a batch script?

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.

这篇关于如何从批处理脚本中运行批处理脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆