After I double clicked a .cmd file and it executed successfully, it just closed the command prompt window. Even if I add pause
to the end it also closes after I hit any key. So is there a way to let me keep using the command prompt, just as if I got the window from running cmd
?
very simple.
Add the following line to the end of your code:
start /b cmd