6

I run command line of Windows 8.1 as Admin. I'm trying change disk from C:\ to D:.

My command:

enter image description here

As you can see CD can change only in current (C:) disk. How can I move to D?

I looked for disk D properties and there Admin have all access to all activity:

enter image description here

joao2fast4u
  • 6,868
  • 5
  • 28
  • 42
Bohdan Vorona
  • 685
  • 1
  • 13
  • 26
  • `cd` never changed the current drive unless you also specify the `/d` parameter. run `cd /?` to see details –  Apr 23 '14 at 07:13
  • The issue is not specific to Windows 8 or Windows 8.1 and has already been raised here: [How to change current working directory using a batch file](http://stackoverflow.com/questions/5138507/how-to-change-current-working-directory-using-a-batch-file) – Andriy M Apr 23 '14 at 08:04
  • to simply change to the current directory of another drive, type only the drive letter and colon. Example: `i:` followed by pressing ENTER will place you in the currently directory of your i-drive. – gerryLowry Jan 13 '15 at 21:18

1 Answers1

13

each drive has its own concept of the current directory. CD changes the current directory, and if you specify a drive letter, it changes the current directory of that drive, rather than (by default) the current drive.

If you want to change the current directory of a different drive, and switch the current drive to that drive also, you use /d:

CD /d D:\
Damien_The_Unbeliever
  • 234,701
  • 27
  • 340
  • 448