Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command Prompt: Why do I get “cannot find the path specified” when I move a folder (with contents) from the desktop to a new directory?

move C:\%USERNAME%\Desktop\TZClock C:\%USERNAME%\Start Menu\Programs\TZClock

I keep getting system cannot find the path specified. But I can navigate to it. Does MOVE only work on files?

like image 416
nicky Avatar asked Apr 09 '11 16:04

nicky


People also ask

Why does it say the specified path does not exist?

You do not have permissions to the file or the file location. The file is on a location that is not currently accessible like a network location or an external drive that is not currently connected to the PC. The file has been moved or deleted. The file or shortcut is corrupt.

How do I find the path in command prompt?

Windows 10 Alternatively follow the instructions below to open the command prompt (even faster than on Windows Server). Go to the destination folder and click on the path (highlights in blue). type cmd. Command prompt opens with the path set to your current folder.

How do I change a folder to desktop in cmd?

Often when opening the command prompt window, you automatically be placed in the (username) directory. Therefore, you only need to type cd desktop to get into the desktop. If you're in any other directory, you would need to type cd \docu~1\(username)\desktop to get into the desktop.


3 Answers

Under Windows XP, it would be thus:

move "c:\documents and settings\%USERNAME%\desktop\TZClock" "C:\documents and settings\%USERNAME%\Start Menu\Programs\TZClock"

On Windows 7, it is the following (though I'm not in a position to test this right now):

move "c:\users\%USERNAME%\desktop\TZClock" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TZClock"
like image 136
Jollymorphic Avatar answered Nov 04 '22 08:11

Jollymorphic


If you want to move more than one directory using wildcard, you can use FOR /D command. Type this in command-line (don't forget to replace _source_dirs_ and _destination_dir_ with your directories):

FOR /D %p IN ("_source_dirs_*") DO MOVE %p _destination_dir_
like image 41
gringo_dave Avatar answered Nov 04 '22 07:11

gringo_dave


Got It! My syntax was wrong: the space was blocking the command from running. Also, I did not have User specified in the path.

After changes:

move C:\Users\%USERNAME%\Desktop\TZClock C:\Users\%USERNAME%\"Start Menu"\Programs\
like image 40
nicky Avatar answered Nov 04 '22 08:11

nicky