views:

1059

answers:

2

It's all in the title. When the program is over, I want it to say "Press any key to continue..." so I can scroll thru the output.

+5  A: 

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 > nil

This gets rid of the original pause message and inserts yours.

Jacob

TheJacobTaylor
That checkbox hasn't been there since the old days of Windows 98.
Joey
Ok, now I am feeling old. Good catch.
TheJacobTaylor
A: 

Hi,

A part of me says that "pause" in the batch file should to the trick. But also give the /K switch a try as well.

HTH

Anand