I'm trying to set a default path in the windows command prompt but my CD command seems to be ignored. I'm not getting any error/warning either. What am I doing wrong? The contents of the prompt -after 2 attempts- are:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Work>cd "D:\Downloads\xlrd-0.9.0.tar\dist\xlrd-0.9.0\x

C:\Documents and Settings\Work>cd D:\Downloads\xlrd-0.9.0.tar\dist\xlrd-0.9.0\xl

C:\Documents and Settings\Work>

Here's a screenshot of what has been going on:


  • @Karan: you're right, that's the same misunderstanding. – RubenGeert Feb 16 '13 at 15:56

Your cd command worked just fine, but you're still looking at the wrong drive.

Type: d: to switch to that drive.

Or, include /D to change the drive in addition to changing the folder:

cd /D D:\Downloads\xlrd-0.9.0.tar\dist\xlrd-0.9.0\xlrd-0.9.0
  • great, it's working now! But I don't really understand why. A path is just a path, right? Why am I looking at the wrong drive if I explicitly pointed to the D:\ drive? Or am I looking for logic where there isn't any? – RubenGeert Feb 16 '13 at 15:48
  • True, but on Windows (and in the old MS-Dos) drives are really separated using that odd c: prefix. On Linux, for example, one would "mount" physical drives into the same file system path, where the path /abc/123 could be a different harddisk than /xyz/456, which in Windows would then be c:\123 and d:\456 – Arjan Feb 16 '13 at 15:51
  • 1
    On Windows every drive has its own path scope. – gronostaj Feb 16 '13 at 17:41

This is intended behaviour for windows.

On just about any operating system 'cd' (change dir) changes to the new directory.

On windows it only does that for a volume, but it does not change to that volume.

If you are on the C: volume (as in your screenshot) and then do a cd d:\foo then you stay in your current folder. You will need to follow it up with d: to actually change to the newly set place.

Not the answer you're looking for? Browse other questions tagged or ask your own question.