When the program is over, I want it to say "Press any key to continue..." so I can scroll thru the output.
Edit your bat file by right clicking on it and select “Edit” from the list. Your file will open in notepad. Now add “PAUSE” word at the end of your bat file. This will keep the Command Prompt window open until you do not press any key.
Type the "cmd /k" parameter before every command to keep the window from closing.
I believe you are looking for the command "pause". It should ask you to press any key.
You can even appear to change the prompt. Instead of just using the pause statement, you can:
echo "Your message here" pause > nul
This gets rid of the original pause message and inserts yours.
Jacob
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With