Computing.Net > Forums > Disk Operating System > xcopy with long filename

xcopy with long filename

Reply to Message Icon

Original Message
Name: Bill Lockie
Date: October 18, 2003 at 15:42:15 Pacific
Subject: xcopy with long filename
OS: w98se
CPU/Ram: 256
Comment:

I get the error msg "Invalid number of parameters" wshen I try to use the following command from a dos window.

xcopy /s/e c:\My Documents\Calendar Formats\*.* c:\amiscdata\calendar\

I;m sure the problem is probaly the long file names used.
I wish to copy the contents of my "documents/calendar formats".
How do I do this in DOS?
Bill


Report Offensive Message For Removal


Response Number 1
Name: Dave357
Date: October 18, 2003 at 18:56:43 Pacific
Reply: (edit)

My DOS is more than a bit rusty, but try enclosing the paths within quotes, as:

xcopy /s/e "c:\My Documents\Calendar Formats\*.*" "c:\amiscdata\calendar\"

HTH

Dave


Report Offensive Follow Up For Removal

Response Number 2
Name: Dan Penny
Date: October 19, 2003 at 02:14:01 Pacific
Reply: (edit)

xcopy /s/e "c:\My Documents\Calendar Formats\"*.* "c:\amiscdata\calendar\"

(First endquote before the *.*)



Report Offensive Follow Up For Removal

Response Number 3
Name: Dave357
Date: October 19, 2003 at 20:50:03 Pacific
Reply: (edit)

Thanks for watching my back, Dan.

I warned you that my DOS was a bit rusty, & I'm on an XP machine right now, so I couldn't test it. :)

Dave


Report Offensive Follow Up For Removal

Response Number 4
Name: Dan Penny
Date: October 20, 2003 at 02:34:00 Pacific
Reply: (edit)

No problem Dave. We Chi-Town boys have to stick together. ;>)


Report Offensive Follow Up For Removal

Response Number 5
Name: RussellR
Date: October 20, 2003 at 18:06:39 Pacific
Reply: (edit)

i dont see why the end quote must be before the *.* .... but im also on an XP machine so i cant test it heh

you dont need the quotes around c:\amiscdata\calendar\ either, cos theres no spaces


Report Offensive Follow Up For Removal


Response Number 6
Name: Dan Penny
Date: October 20, 2003 at 19:55:32 Pacific
Reply: (edit)

"you dont need the quotes around c:\amiscdata\calendar\ either, cos theres no spaces"

You do need the quotes because amiscdata is longer than eight characters.


Report Offensive Follow Up For Removal

Response Number 7
Name: Dan Penny
Date: October 20, 2003 at 20:18:02 Pacific
Reply: (edit)

"i dont see why the end quote must be before the *.* .... but im also on an XP machine so i cant test it heh"

Sorry, I forgot about the first part above; The end quote "defines" the path which is out of the 8.3 ~directory structure~, while the wildcards are a separate element of the ~command~ you're trying to execute. Did I say that right? ;>)


Report Offensive Follow Up For Removal

Response Number 8
Name: RussellR
Date: October 21, 2003 at 18:22:13 Pacific
Reply: (edit)

heh, its simpler to put the quotes around the whole thing, it will work if the quotes are before the *.* or after it ... personal preference really :)


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: xcopy with long filename

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge