12

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...

Endoro
  • 37,015
  • 8
  • 50
  • 63
Andre
  • 661
  • 7
  • 14
  • 29

6 Answers6

16

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

D:\>cd /d C:\

instead of

D:\>cd /c C:\
Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
12

OK, I'll set it as an answer, then...

How about cd /d "C:\" rather than cd /c"c:\"

Magoo
  • 77,302
  • 8
  • 62
  • 84
10
cd /d "C:\"

is the answer

Credit go's to Peter Wright

Andre
  • 661
  • 7
  • 14
  • 29
6

You can change dir from c to d with simple command

C:\> d:

Then you will get

D:\>
seenukarthi
  • 8,241
  • 10
  • 47
  • 68
Vinod Kumar
  • 312
  • 4
  • 10
2

To change D: drive to C: drive, type just c::

d:\\>c:    
c:\\>

To change c: drive to d: drive, d::

c:\\>d:    
d:\\>
Remi Guan
  • 21,506
  • 17
  • 64
  • 87
Nyein
  • 276
  • 3
  • 11
1

you can't use cd /x x:\ for your network drive, the command is always cd /d

Endoro
  • 37,015
  • 8
  • 50
  • 63