Windows 7 - CMD command to keep cmd open after executing

For some reason I cannot open the cmd. I created a simple bat file that does dir but it immediately closes the cmd as well. Is there a way I can keep the cmd open with some command?

2

2 Answers

Adding pause at the end of the batch script should keep it open until you press any key to continue.

7

try this:

Put cmd /k on the very last line of the script.

You Might Also Like