Command Prompt (CMD) Doesn’t Change Directories

When working with command prompt, to change directories you usually do something like the following :

cd [FilePath]

I was using the above method to try and change directories to a different drive (ie c:\ to f:\), and it wasn’t working. After googling and reading Microsoft’s documentation about CD, I realized I needed to just include the drive. When using CD, you are just changing the directories within the drive which CMD is currently looking in. So, to change the drive, just write the following :

[drive letter]:

Update : 10/14/2013
Chris in the comments below included a good point I forgot to mention, if you want to change the directory all in one line, you can do so with the following command

cd /d o:\test\test

For example :

To change from c:\ to o:\   (Without the quotes… Syntax highlighter hides the drive path if I don’t include them)


That’s all you need!

Releated Post

2 thoughts on “Command Prompt (CMD) Doesn’t Change Directories

  1. If you wanted to to change to a specific directory all in on line you can use /d. So if you in c: and want to goto o:\test\test you can use cd /d o:\test\test

Leave a Reply

%d bloggers like this: