my command prompt defaulting to H drive and not changing to C drive

When I use cd /c: its not changing to the C drive.

Note that the command above is incorrect, it should be cd c:\ or c:/.

If you want to change the current drive in addition to changing directory use the /d option:

cd /d c:\

Use the /D switch to change current drive in addition to changing current directory for a drive.

Example:

F:\test>cd c:\

F:\test>rem drive doesn't change

F:\test>cd /d c:\

c:\>rem drive changes

cd usage

c:\>cd /?
Displays the name of or changes the current directory.

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

  ..   Specifies that you want to change to the parent directory.

Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.

Use the /D switch to change current drive in addition to changing current
directory for a drive.

If Command Extensions are enabled CHDIR changes as follows:

The current directory string is converted to use the same case as
the on disk names.  So CD C:\TEMP would actually set the current
directory to C:\Temp if that is the case on disk.

CHDIR command does not treat spaces as delimiters, so it is possible to
CD into a subdirectory name that contains a space without surrounding
the name with quotes.  For example:

    cd \winnt\profiles\username\programs\start menu

is the same as:

    cd "\winnt\profiles\username\programs\start menu"

which is what you would have to type if extensions were disabled.

Further Reading

  • An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
  • cd - Change Directory - Select a Folder (and drive)

On your Start menu type cmd, then Command Prompt will be shown from the list. Right click it, select Properties.

Enter c: in the Start in field instead of %homedrive%%homepath%. Click ok.

Done.


This how-to demonstrates how to easily change the default path in a command prompt.

Many people tend to run the command cd /d C:\ to do so. This is great but but running this command does not permanently change the path so you will have to change the path next time you open the Command Prompt.

Some people also edit the registry to achieve this but that is easier to mess up.

The last solution I've seen is to create a .bat that runs the command cd /d C:\ every time you open the Command Prompt. This causes an extra step and can cause confusion in the future.

The method in this How-to shows, in my opinion, the most direct and easiest way to change your default path.

2 Steps total

Step 1

Open the Command Prompt's Location

On the start screen / menu, type in "cmd", right-click it and select "Open File Location".

Step 2

Open the Command Prompt Properties and change the "Start In" Property Right-Click on "Command Prompt" icon, select "Properties", and edit the "Start In" property to your desired path. I used "C:\" as an example

When starting the command prompt, the default path will be the new path you've specified earlier