views:

2120

answers:

2

Can someone tell me what cmd to put at the end of a batch file to stop it from auto closing? Thanks!

+16  A: 

In Windows/DOS batch files:

pause

This prints a nice 'Press any key to continue . . . " message

Dave Bauman
+7  A: 

Depends on the exact question.

Normally 'pause' does the job within a .bat file.

If you want cmd.exe not to close to be able to remain typing, use 'cmd /k command'.

Rutger Nijlunsing