Editing cmd on the fly

A piece of advice: if you started running a Windows cmd script and it’s currently in progress, and you got an awesome idea and decided to edit the cmd-file, then don’t save that file.

Apparently when Windows executes cmd-file it doesn’t put it into memory and just saves the pointer to the next line to execute. So when you edit it, that pointer starts pointing to some strange place.

This is kinda obvious idea but after working with PHP for some many years I get used to its behavior and that I can safely edit files even when they are executed (normally during debugging) since they were compiled into RAM and executed from there. I think Python behaves same way as PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.