Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The path for every new instance of the shell starts in my user directory (C:\Users\user).

Within this directory or rather drive (in this case C:) I can't use the cd command as I'm used to - it only echoes the specified directory.

As soon as I change the directory to a parent-directory I can execute "cd D:" and it changes to the drive.

But this behavious doesn't appear consistently in all instances of the shell.

Sometimes I have to go to C: to change it.

I'm quite sure I'm not using the command in the wrong way, since it's what I'm used to do to start grails.

share|improve this question

migrated from Apr 14 '12 at 21:44

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

To switch to another drive, just use that drive letter. The command D: switches to the D-drive. To change to another directory, say, the root of D:, you'll need two commands:

cd D:\
cd \

The Windows shell has an active directory for each drive/volume. If you specify the drive letter, you change the active directory for that volume, but you will not actually make that volume active too.

share|improve this answer
AAAh im so dumb. thanks for the clarification. Read the help entry of the command and with your comment I finally found my mistake. – Zobbl Apr 14 '12 at 16:21

cd with just a drive only shows the current directory on that drive. Either pass the drive itself as a command to switch to its current directory (d:), or use cd /d to switch both drive and directory.

share|improve this answer
Further testing led me to a more specific problem. I edited the question. In addition I'm trying to change the directory like D:\somefolder and just the drive. – Zobbl Apr 14 '12 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .