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?

前端 未结 3 478
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 10:51
move C:\\%USERNAME%\\Desktop\\TZClock C:\\%USERNAME%\\Start Menu\\Programs\\TZClock

I keep getting system cannot find the path specified. But I can

相关标签:
3条回答
  • 2021-01-04 11:06

    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_
    
    0 讨论(0)
  • 2021-01-04 11:12

    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\
    
    0 讨论(0)
  • 2021-01-04 11:19

    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"
    
    0 讨论(0)
提交回复
热议问题