用一個bat文件調用另外兩個bat文件,當1.bat執行完后再執行2.bat


用一個bat文件調用另外兩個bat文件,當1.bat執行完后再執行2.bat

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

 

@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

 

復制代碼
 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
復制代碼


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM