用一个bat文件调用另外两个bat文件,当1.bat执行完后再执行2.bat



 


@echo off


start d:\1.bat

start c:\2.bat

这样是2个任务同时执行,应该怎么改,谢谢


 


 





1


2


3


4


5


6


7


8


9




​@​​​​echo​​ ​​off​


 


​start ​​​​/wait​​ ​​d:\1.bat​


​start ​​​​/wait​​ ​​c:\2.bat​


 


​@​​​​echo​​ ​​off​


 


​call d:\1.bat​


​call c:\2.bat​



  


 


start 是在新窗口运行调用的文件,call是在当前的窗口运行。 start /wait是指启动应用程序并等待其结束

 

 

顺序执行bat的方式是使用call  xxx.bat

 



用一个bat文件调用另外两个bat文件,当1.bat执行完后再执行2.bat_3d

1 @echo off
2
3 :: 获取当前目录绝对路径
4 ::set current_path="%cd%"
5
6 set CUSTOM_PROJECT=MD702G_FT
7 echo "=======./build_MD702G_FT.bat running.=================================%current_path%"
8 ::xcopy .\projects\%CUSTOM_PROJECT% . /Y /S
9 call .\liuyan.bat
10 ::make custom=ULTRA2503D_11C gprs %*
11 call .\make_FT.bat gprs %*
12
13 ::拷贝程序包, 发布
14 cd %current_path%
15 call .\3_ft_copy.bat


用一个bat文件调用另外两个bat文件,当1.bat执行完后再执行2.bat_3d