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?
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?
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.