如何.bat文件中运行多个.bat文件 [英] How to run multiple .BAT files within a .BAT file
本文介绍了如何.bat文件中运行多个.bat文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图让我的提交-的build.bat
来执行其它.bat文件作为我们构建过程的一部分。
I'm trying to get my commit-build.bat
to execute other .BAT files as part of our build process.
的内容提交-的build.bat
:
"msbuild.bat"
"unit-tests.bat"
"deploy.bat"
这看起来很简单,但提交-的build.bat
仅执行列表中的第一项( msbuild.bat
)。
This seems simple enough, but commit-build.bat
only executes the first item in the list (msbuild.bat
).
我已经没有问题单独运行每个文件。
I have run each of the files separately with no problems.
推荐答案
使用
call msbuild.bat
call unit-tests.bat
call deploy.bat
在不使用CALL,当前的批处理文件停止,称为批处理文件开始执行。这是一个奇特的行为可以追溯到早期的MS-DOS天
When not using CALL, the current batch file stops and the called batch file starts executing. It's a peculiar behavior dating back to the early MS-DOS days
这篇关于如何.bat文件中运行多个.bat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文