How to skip pause in batch file

前端 未结 2 1607
北海茫月
北海茫月 2020-12-05 22:32

In windows batch file, if myScript.bat runs otherScript.bat, and in otherScript.bat, there\'s a pause in first line. How can I send a keystroke to skip that pause in myScrip

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-05 23:16

    You could modify otherScript.bat so that it accepts an optional parameter, telling it to skip the pause command like this:

    if "%1"=="nopause" goto start
    pause
    :start
    

提交回复
热议问题