How do I run a batch script from within a batch script?

前端 未结 8 1599
礼貌的吻别
礼貌的吻别 2020-12-12 18:48

How do I call another batch script from within a batch script?

I want it to execute in an if statement.

相关标签:
8条回答
  • Use CALL as in

    CALL nameOfOtherFile.bat
    

    This will block (pause) the execution of the current batch file, and it will wait until the CALLed one completes.

    If you don't want it to block, use START instead.

    Get the nitty-gritty details by using CALL /? or START /? from the cmd prompt.

    0 讨论(0)
  • 2020-12-12 19:22

    You should use CALL

    CALL batch.bat
    
    0 讨论(0)
提交回复
热议问题