0

When I run a compilation command from batch file, the command did execute but after it completed, the command window close immediately

I'm expecting the result shows in the command window after compilation has been completed

2
  • you can either start the batch file from cmd.exe (instead of double clicking it in the file explorer), or you can end the batch file with a command that asks for user input Commented Jul 9, 2024 at 12:17
  • This question is similar to: Keep CMD open after BAT file executes. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Please spend at least 5 minutes googling your problems... Commented Jul 10, 2024 at 14:42

1 Answer 1

0

Just append to your batch file an instruction that requires you to press a key before moving forward. Try this:

echo Press any key to exit...  
pause 

Reference here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.