Keep CMD open after BAT file executes

pattyd picture pattyd · Jul 30, 2013 · Viewed 347.7k times · Source

I have a bat file like this:

ipconfig

That will print out the IP info to the screen, but before the user can read that info CMD closes itself.

I believe that CMD assumes the script has finished, so it closes.

How do I keep CMD open after the script is finished?

Answer

ElGavilan picture ElGavilan · Jul 30, 2013

Put pause at the end of your .BAT file.