Suppress the 'press any key to continue' in batch script

前端 未结 2 1417
小鲜肉
小鲜肉 2021-02-08 16:52

I am writing a batch script. After a stage in the command window it says \'press any key to continue\' and halts, and after something is pressed the script continues. How can I

相关标签:
2条回答
  • 2021-02-08 17:38

    Pause>nul Will make it not echo 'press any key to continue . . .'

    0 讨论(0)
  • 2021-02-08 17:48

    That's the output of the PAUSE command:

    http://ss64.com/nt/pause.html

    The problem with PAUSE is that it's often necessary when you run a batch file from Windows explorer (or you cannot read the output) but it's annoying in the command prompt. I asked about it here and I was suggested a nifty trick:

    Conditional PAUSE (not in command line)

    0 讨论(0)
提交回复
热议问题