This text "Press any key to continue", I don't want this to show up, is there a way I could hide this part of the text but I also want the previous to stay, thus the pause command.

  • Thank you all, both methods worked, both answers were helpful. However, since I'm more familiar with the "pause" code approach, I will continue to use SvW's method. Kudos to you Zoredache.
    – Nigel
    Nov 7, 2013 at 18:21

2 Answers 2



pause > nul:

nul: is the DOS/Win equivalent to /dev/null, redirecting the output to nowhere.


Use set /p garbage=. Your program will wait until you hit enter, and nothing will be displayed. The garbage variable will contain anything they typed. You can safely ignore that.

  • There's a minor difference - pause will accept any key, while set /p will wait for a line feed (enter key).
    – Bob
    Nov 10, 2013 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy