Tech Talk A software developer on all things tech, and then some

13Aug/132

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)

"o:"

That's all you need!

Comments (2) Trackbacks (0)
  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

No trackbacks yet.

%d bloggers like this: