Change output of pause command in batch script

后端 未结 9 514
孤独总比滥情好
孤独总比滥情好 2020-12-24 11:14

I\'m writing a Windows batch script. By default, the pause command will pause the script and display the text "Press any key to continue...".

9条回答
  •  离开以前
    2020-12-24 12:12

    Another dirty solution would be something like this,

    SET /P =Press enter to return to the menu . . . 
    GOTO :menu
    

    The benefit of this is that the cursor stays on the same line as the message, just like with the PAUSE command.

    The downside is that it only listens to the enter key.

提交回复
热议问题