If you have observed that command prompt closes automatically after it’s execution, this article explains you how to fix that.
I noticed it when i executed a batch file. It opened the command prompt, executed the commands and disappeared immediately after execution is completed.
Stop Command Prompt from closing automatically
Add /K after each command. This will keep the command prompt open.
Example: “cmd /k file.bat”