In CMD / .bat I can change dir from C to D but not other way around?

Andre picture Andre · Jul 2, 2013 · Viewed 89.1k times · Source

Ok so here is a copy-paste of my CMD window

C:\Documents and Settings\Developer>cd /d "D:\"
D:\>cd /c "C:\"
The filename, directory name, or volume label syntax is incorrect.
D:\>

when I run cd /d "D:\" in C drive it works fine, but when I run cd /c "C:\" in D drive then I get a error

So how do I change the Directory back to C drive ??

EDIT:

Here is simpler "copy-paste" of my CMD window

C:\>cd /d "D:\"
D:\>cd /c "C:\"
The filename, directory name, or volume label syntax is incorrect.
D:\>

Doesn't make scene why its not working...

Answer

Ansgar Wiechers picture Ansgar Wiechers · Jul 2, 2013

The parameter is always /d (for "drive"), so you need to do

D:\>cd /d C:\

instead of

D:\>cd /c C:\