Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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.

Instead can I just download it so It is not just a hasle?
I build Custom Computers And Write Software

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.

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:\NewfoldernameI build Custom Computers And Write Software

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

somthing like this:
CD C:\Documents and Settings\Administrator\desktopMD iPod_Muic
XCOPY D:\iPod_Control\Music C:\Documents and Settings\Administrator\Desktop\iPod_Music
I build Custom Computers And Write Software

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

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

![]() |
Batch Menus
|
Need help Programming the...
|

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