The CD pseudo environment variable in batch file: do not overwrite it with a real one!
Posted by jpluimers on 2014/10/08
I never realized you could overwrite the CD pseudo environment variable. If you do, the automatic value of the pseudo variable will not be udpated any more:
You have at some point set the CD variable explicitly. If you do this it will no longer automatically reflect the current working directory. To undo this, set it to empty:
set CD=
Thanks Jonathan and … for explaining this in both your answers.
Thanks to another answer by Endoro I now also know of the %=C:% pseudo variable (you have one per drive letter) that indicate the current directory per drive letter.
–jeroen
via: batch file – When is the CD environment variable updated? – Stack Overflow.






Rick said
I’ve noticed some strange behavior with posting here. If I enter an email that is already in use with a word press account it wants me to login. Since I don’t have a word press account I can’t login. So I try to just change the email address and click “Post Comment” again. But nothing happens.
BTW… I don’t use email so really you need a way to let people post without entering an email.
jpluimers said
I’d get much much more spam if I’d allow that.