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

前端 未结 17 1924
别跟我提以往
别跟我提以往 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:23

    Run Multiple Batch Files Parallelly

    start "systemLogCollector" /min cmd /k call systemLogCollector.bat
    start "uiLogCollector" /min cmd /k call uiLogCollector.bat
    start "appLogCollector" /min cmd /k call appLogCollector.bat
    

    Here three batch files are run on separate command windows in minimized state. If you don't want them minimized, then remove /min. Also, if you don't need to control them later, then you can get rid of the titles. So, a bare-bone command will be- start cmd /k call systemLogCollector.bat


    If you want to terminate them-

    taskkill /FI "WindowTitle eq appLogCollector*" /T /F
    taskkill /FI "WindowTitle eq uiLogCollector*" /T /F
    taskkill /FI "WindowTitle eq systemLogCollector*" /T /F
    

提交回复
热议问题