Command line prompt will not change directory to the C:\ prompt

62,832

Solution 1

I am sure if you know the right path you will be able to traverse to that path with the cd command. Anyway you can still do one of the following:

  1. Go to the folder (using file explorer) you want to work around in through CMD, copy the address from the address bar and paste it in a command prompt after cd . For example: cd C:\path\to\folder.

  2. You can also go to the desired folder (again using file explorer), right click ---> Open command prompt here.

Solution 2

To get to the Program Files folder, try using cd C:\Program Files.
If that may not work, you can also use the short name, which would be cd C:\Progra~1.

Solution 3

The cd command with no arguments does not change your current directory; it simply displays your current directory path.

To change up one level, you have to "cd to parent" with the command cd .. (with or without the space.)

Solution 4

I recently had the same issue. Any time I tried to change to the C:\ it just went to the D:\ drive with no error messages. Opening cmd.exe gave me the "system cannot find the path specified" error.

I fixed it by editing the PATH environmental variables. There were a couple of entries that were invalid. Once those were deleted I could cd to C:\ again!

On Windows 10, Open the start menu and type "env" and the control panel option will pop up in the search. From there, click "Environmental Variables" near the bottom. There is a user Path and a system Path. If you click on "Path" and then "Edit" you can see and delete individual entries.

Be careful here!

Solution 5

To get to the root of the C drive, you could either type cd C:\ or cd \. Keep in mind that the first command requires that the current drive of the command prompt is C, and that the second command will take you to the root of the current drive (so if the current drive of the command prompt was F, you would be taken to the root of that).

So you could get to C:\Program Files by typing cd \Program Files.
Typing cd with no arguments will simply just display the current drive and directory.

To change to a different drive, either type cd /D F: or simply just F: (where F is the drive letter of the drive)

Share:
62,832

Related videos on Youtube

rob_ot riot
Author by

rob_ot riot

Updated on September 18, 2022

Comments

  • rob_ot riot
    rob_ot riot over 1 year

    I want to start using the command prompt feature (Windows 10) but the prompt starts out as C:\Users\owner. The cd command doesn't move up a level. I want to get to C:\Program Files, but I can't get to the C:\ prompt, or even C:\Users prompt. I don't get an error message, it just outputs C:\Users\owner.

    Running Command Prompt as an administrator doesn't help. That just give me a C:\WINDOWS\system32, where cd doesn't turn the prompt into C:\WINDOWS.

    Anyone know how to fix this?

    • Steve Rindsberg
      Steve Rindsberg about 8 years
      CD .. (CD space dot dot) moves you up one level. CD by itself leaves you where you are. CD %programfiles% will take you to the program files directory directly. CD \ (CD space backslash) takes you to the root directory. If none of these work, it may be a permissions issue.
    • Kurt E. Clothier
      Kurt E. Clothier about 2 years
      I have the same issue. IDK why other users don't believe you or think you are a moron. I type cd C:\ and it just puts me at D:\. When I first open cmd.exe it says "cannot find the specified path" like it's being hidden or something and goes to D:\ . Very Weird. I've never had this problem before. I blame the IT guys.
  • Vassile
    Vassile about 8 years
    Works without space.
  • Darwin von Corax
    Darwin von Corax about 8 years
    @Vassile Could be - I'm more familiar with bash :P
  • Steve Rindsberg
    Steve Rindsberg about 8 years
    "This is in line with established behaviour in the *nix universe." But OP is using Windows 10, as stated. This being Windows, *nix behavior isn't relevant. In Windows, CD takes you nowhere ... it simply leaves you in the same directory you're already in.
  • Patrick Seymour
    Patrick Seymour about 8 years
    It isn't just "taking you nowhere." It's giving you the current directory, similar to pwd in other OSes.
  • Scott - Слава Україні
    Scott - Слава Україні about 8 years
    You can also type cd  (c, d, space) and then drag a folder from Windows Explorer to cmd.  (This acts like copy and paste.)
  • RalfFriedl
    RalfFriedl about 5 years
    This is wrong, and the correct answer was already given (cd "C:\...")