0

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?

1
  • 2
    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. Feb 28, 2016 at 21:17

7 Answers 7

3

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.

1
  • 1
    You can also type cd  (c, d, space) and then drag a folder from Windows Explorer to cmd.  (This acts like copy and paste.) Feb 29, 2016 at 4:00
3

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.

2

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.)

4
  • Works without space.
    – Vassile
    Feb 28, 2016 at 20:56
  • @Vassile Could be - I'm more familiar with bash :P Feb 28, 2016 at 20:57
  • "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. Feb 28, 2016 at 21:14
  • It isn't just "taking you nowhere." It's giving you the current directory, similar to pwd in other OSes. Feb 28, 2016 at 22:21
1

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)

1

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!

0

Start Explorer, go to the directory where you want to open the command prompt, click on File->Open command prompt->Open command prompt or Open command prompt as administrator.You can also do a right click on both entries and add them to the quick launch area in the window title of Explorer to access the commands easier:

enter image description here

0

cd "Program Files"

Make sure that you have administrator privileges and use double quotes because of the space between 'Program' and 'Files'.

1
  • This is wrong, and the correct answer was already given (cd "C:\...")
    – RalfFriedl
    Feb 23, 2019 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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