DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
用一个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
复制代码
posted on 2019-11-04 11:32  DoubleLi  阅读(12122)  评论(0编辑  收藏  举报