What is the reason for the CD /D switch in Windows cmd?

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

Leave a Comment