Computing.Net > Forums > Programming > XCOPY Command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

XCOPY Command

Reply to Message Icon

Name: Lamez
Date: May 25, 2006 at 22:24:43 Pacific
OS: Windows XP Pro
CPU/Ram: 512MB
Product: Custom
Comment:

I tried to use the XCOPY Command in Xp and it did not work? Do I need to download it like I did the Choice Command? If so where at? this is something I typed in

MD H:\newfolder
xcopy C:\foldername H:\newfolder


I build Custom Computers And Write Software



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: May 26, 2006 at 02:49:43 Pacific
Reply:

XCopy is part of the standard set of external commands stored in System32 folder while Choice.exe does not belong to all usual XP distributions.

So it is likely you have problem with your Path environment variable that does not store the standard links.

Locate Xcopy.* and then check if its location is among the paths displayed typing Path at prompt.


0

Response Number 2
Name: Lamez
Date: May 26, 2006 at 06:54:56 Pacific
Reply:

Instead can I just download it so It is not just a hasle?

I build Custom Computers And Write Software


0

Response Number 3
Name: IVO
Date: May 26, 2006 at 07:15:37 Pacific
Reply:

I don't know where you can download XCopy from as it is a copyrighted MS program to be delivered bundled with a MS operating system.

Anyway I repeat your system has troubles that is better you find and fix other than patch it.



0

Response Number 4
Name: Lamez
Date: May 26, 2006 at 07:32:49 Pacific
Reply:

oh Well I found it when I download DOS Commands it was a setup that has alot of dos commands but I was just wondering. Oh did I use it right...
MD H:\Newfoldername
XCOPY C:\foldername H:\Newfoldername

I build Custom Computers And Write Software


0

Response Number 5
Name: Michael J (by mjdamato)
Date: May 26, 2006 at 08:39:57 Pacific
Reply:

Your usage is fine. Couple questions:

1) how are you running this? In a batch file, command line, what?

2) What are the folder names? If the folders are very long or have spaces in them you need to put them within quotes like this:

MD "H:\Newfoldername"
XCOPY "C:\foldername" "H:\Newfoldername"

Also, instead of creating the new directory, you can just add the /i parameter to xcopy and it will create the directory if it does not exist, so you would just need:

XCOPY "C:\foldername" "H:\Newfoldername" /i

Michael J


0

Related Posts

See More



Response Number 6
Name: Lamez
Date: May 26, 2006 at 13:32:26 Pacific
Reply:

somthing like this:
CD C:\Documents and Settings\Administrator\desktop

MD iPod_Muic

XCOPY D:\iPod_Control\Music C:\Documents and Settings\Administrator\Desktop\iPod_Music

I build Custom Computers And Write Software


0

Response Number 7
Name: Michael J (by mjdamato)
Date: May 26, 2006 at 13:48:04 Pacific
Reply:

There's your problem. The paths you are using have spaces in them. In the command line a space indicates the end of a piece of data. So, you need tio enclose the paths with quotes.

Also, there is no need to change directory ("CD") since you are specifying the full directory paths in your XCOPY line. And as I stated before you do not need to create the destination directory - XCOPY can do that for you.

This single line should be all that you need:

XCOPY "D:\iPod_Control\Music" "C:\Documents and Settings\Administrator\Desktop\iPod_Music" /i

You might also want to take a look at this page to see if there are any additional XCOPY parameters that might make your life easier (such as not copying files if they already exist in the destination and the source is not newer).

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true
Michael J


0

Response Number 8
Name: Mechanix2Go
Date: May 26, 2006 at 14:13:43 Pacific
Reply:

Hi MJ,

You can skip the /i and add a final backslash to the destibation.

And for help, the good 'ol xcopy /?


=====================================
If at first you don't succeed, you're about average.

M2



0

Sponsored Link
Ads by Google
Reply to Message Icon

Batch Menus Need help Programming the...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: XCOPY Command

Xcopy command is not working www.computing.net/answers/programming/xcopy-command-is-not-working/17730.html

XCOPY - Batch Help www.computing.net/answers/programming/xcopy-batch-help/10929.html

Xcopy exclude help! Please read www.computing.net/answers/programming/xcopy-exclude-help-please-read/12611.html