用一個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
複製代碼
相關文章
相關標籤/搜索