如何从第三批调用两批?
当我的 Windows 批处理文件 (.bat) 调用其他两个 BAT 文件时,它会在第一个文件之后退出。
如何让它同时运行?
When my Windows Batch file (.bat) calls other two BAT files it exits after the first one.
How to make it run both of them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
call
在调用批处理文件中
例如:(另外,还有更多背景这里< /a>。)
use
call
e.g. in the calling batch file:
(also, some more background here.)
除了使用
call
作为 mikej 注释之外,如果您需要从其中一个批处理文件返回错误代码,则使用I think if the last command in a batch file returned a non-zero errorlevel then默认情况下,这作为批处理文件本身的错误级别返回。
In addition to using
call
as mikej notes, if you need to return an error code from one of the batch files then useI think if the last command invoked in a batch file returns a non-zero errorlevel then this is returned as the errorlevel of the batch file itself by default.