The command interpreter is running a .bat or .cmd.
What will be the behaviour of cmd.exe if I edit and save this .bat while it is running? Is it documented anywhere?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It actually depends on where you make the changes. The question linked above has what I feel are the right answers (actually I think rein’s answer was better than Binary Worrier’s), but I feel the need to leave this here.
I highly recommend against changing the batch file while it’s running. Stop the job, make your changes, and retry. This is of the essence for proper testing in my opinion.
If you are intending for the batch file to update itself, I would highly recommend against it. Create another batch file from your original and call that batch. This is a far safer method in my opinion.