EpicEagle229
EpicEagle229

Reputation: 21

cd command won't change directory. Comand prompt

I have windows 8, and I'm using the command prompt. It says C:\Windows\System32>
and if i try to change directory, it says "The system cannot find the path specified."

In this case, im typing the exact following command: cd desktop

It works fine on my windows 7 computer. Why is it doing this?

Upvotes: 2

Views: 8176

Answers (2)

rez
rez

Reputation: 338

I had the same problem in windows 10. When I opened CMD as a user, the default path was on my user profile in which my desktop is set. So, when I wrote cd desktop, it found my desktop right away (below image). enter image description here

However, when I run CMD as an administrator, the default path changes to C:\Windows\system32 which is my SystemRoot. Within this path, there is no desktop folder. Therefor, when you type `cd desktop it will produce an error (below image).

Image two: CMD run as administrator

What you need to do is to address the whole file path in your cd command. In this way your computer will know where your file is located exactly (below image)

Image three: cd in CMD admin with complete path

Upvotes: 2

Blorgbeard
Blorgbeard

Reputation: 103467

Because your desktop folder is not in c:\windows\system32. Presumably, your Windows 7 cmd prompt started you in your user folder instead of system32.

Try this instead.

cd %userprofile%\Desktop

Upvotes: 4

Related Questions