cd command won't change directory. Comand prompt
Asked Answered
C

2

2

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?

Cicelycicenia answered 5/11, 2014 at 2:6 Comment(2)
Because Desktop is not in the System32 folder; it is in the Users folder. I don't know why it does it in Windows 7.Gotten
Even with Windows 7, it should not be in System32 folder as well. A misconfiguration.Oralla
U
4

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
Ulyanovsk answered 5/11, 2014 at 2:9 Comment(0)
V
2

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

Varia answered 21/7, 2022 at 1:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.