Posted: 3/22/2008 7:52:21 PM EDT
|
I am trying to move one file from one dir to another in XP. Dos starts in C:\Documents and Settings\Justin\Desktop and I used the following move C:\Documents and Settings\Justin\Desktop\source\test.txt C:\Documents and Settings\Justin\Desktop\destination it says the syntax of my command is incorrect. I've tried different ways and I either get that or file cannot be found. What am I doing wrong? |
Try.. move "C:\Documents and Settings\Justin\Desktop\source\test.txt" "C:\Documents and Settings\Justin\Desktop\destination\test.txt" |
it says system cannot find the path specified |
|
One of your directories doesn't exist, did you make "destination"? Here's my fooling around: C:\Documents and Settings\Owner\Desktop>dir Volume in drive C is HP_PAVILION Volume Serial Number is 6C44-B700 Directory of C:\Documents and Settings\Owner\Desktop 01/31/2008 08:41 AM <DIR> . 01/31/2008 08:41 AM <DIR> .. 04/29/2005 10:30 PM 1,646 DVD Decrypter.lnk 02/19/2006 01:22 PM 1,636 eBay Turbo Lister.lnk 01/16/2004 10:08 AM 1,675 Exceed.lnk 09/01/2006 09:07 AM 582 mstsc.exe.lnk 06/12/2004 04:41 AM 1,598 Net2Phone CommCenter.lnk 01/09/2004 07:28 PM 627 NetMeeting.lnk 12/30/2003 01:16 PM 717 Register with HP.lnk 10/01/2007 06:21 PM 2,092 Rhapsody Music Management.lnk 10/01/2007 06:21 PM 2,048 Rhapsody Play Music Free.lnk 12/31/2007 02:26 PM 840 Sametime Connect.lnk 02/26/2004 12:08 PM 639 VNC Viewer.lnk 11 File(s) 14,100 bytes 2 Dir(s) 120,888,463,360 bytes free C:\Documents and Settings\Owner\Desktop>touch test.txt C:\Documents and Settings\Owner\Desktop>notepad test.txt C:\Documents and Settings\Owner\Desktop>dir Volume in drive C is HP_PAVILION Volume Serial Number is 6C44 Directory of C:\Documents and Settings\Owner\Desktop 03/23/2008 12:54 AM <DIR> . 03/23/2008 12:54 AM <DIR> .. 04/29/2005 10:30 PM 1,646 DVD Decrypter.lnk 02/19/2006 01:22 PM 1,636 eBay Turbo Lister.lnk 01/16/2004 10:08 AM 1,675 Exceed.lnk 09/01/2006 09:07 AM 582 mstsc.exe.lnk 06/12/2004 04:41 AM 1,598 Net2Phone CommCenter.lnk 01/09/2004 07:28 PM 627 NetMeeting.lnk 12/30/2003 01:16 PM 717 Register with HP.lnk 10/01/2007 06:21 PM 2,092 Rhapsody Music Management.lnk 10/01/2007 06:21 PM 2,048 Rhapsody Play Music Free.lnk 12/31/2007 02:26 PM 840 Sametime Connect.lnk 03/23/2008 12:54 AM 4 test.txt 02/26/2004 12:08 PM 639 VNC Viewer.lnk 12 File(s) 14,104 bytes 2 Dir(s) 120,888,455,168 bytes free C:\Documents and Settings\Owner\Desktop>mkdir destination C:\Documents and Settings\Owner\Desktop>cd \ C:\>move "C:\Documents and Settings\Owner\Desktop\test.txt" "C:\Documents and Settings\Owner\Desktop\destination\test.tx t" C:\>cd C:\Documents and Settings\Owner\Desktop\destination C:\Documents and Settings\Owner\Desktop\destination>dir Volume in drive C is HP_PAVILION Volume Serial Number is 6C44 Directory of C:\Documents and Settings\Owner\Desktop\destination 03/23/2008 12:55 AM <DIR> . 03/23/2008 12:55 AM <DIR> .. 03/23/2008 12:54 AM 4 test.txt 1 File(s) 4 bytes 2 Dir(s) 120,880,590,848 bytes free C:\Documents and Settings\Owner\Desktop\destination> |
wtf do you get this?
|
|
try move C:\"Documents and Settings"\Justin\Desktop\source\test.txt C:\"Documents and Settings"\Justin\Desktop\destination folders with spaces need quotes around them when using them in a command line. edit: it works. I accept PayPal and Target gift certificates. |