How to run multiple .BAT files within a .BAT file

前端 未结 17 1880
别跟我提以往
别跟我提以往 2020-11-22 13:59

I\'m trying to get my commit-build.bat to execute other .BAT files as part of our build process.

Content of commit-build.bat:



        
17条回答
  •  一向
    一向 (楼主)
    2020-11-22 14:24

    If we have two batch scripts, aaa.bat and bbb.bat, and call like below

    call aaa.bat
    call bbb.bat
    

    When executing the script, it will call aaa.bat first, wait for the thread of aaa.bat terminate, and call bbb.bat.

    But if you don't want to wait for aaa.bat to terminate to call bbb.bat, try to use the START command:

    START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/AFFINITY ] [/WAIT] [/B] [command/program]
      [parameters]
    

    Exam:

    start /b aaa.bat
    start /b bbb.bat
    

提交回复
热议问题