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

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

 摘自:https://zhidao.baidu.com/question/492732911.htmlhtml

 

@echo off

start d:\1.batbash

start c:\2.batui

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

 

 

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是指启动应用程序并等待其结束code

 

 

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

 

复制代码
 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
复制代码
相关文章
相关标签/搜索