At first I'd like to say that I do understand the purpose of the /D
switch for the Windows Command Prompt cd
command. I'm just curious why it works this way, and not other. As we all know, it does the following:
Use the /D switch to change current drive in addition to changing current directory for a drive.
But every single time I enter (for example) cd F:
, it's obvious enough that I would like to change the drive. That is why I think this switch is redundant by itself.
So what's the point of explicitly setting this switch? Why it isn't implied by default?
Short answer: Because DOS behaved this way, and cmd
tries to mimic DOS.
Originally, DOS had a 'current director' for each drive, so if you write cd d:\folder
you change the current directory for the D
drive.
You can read more about this here: http://blogs.msdn.com/b/oldnewthing/archive/2010/10/11/10073890.aspx