Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am having problems copying my system to my new HD. I have been trying to use the following command "xcopy c: d: /s /e /h /r /c /k" and variations of the command, but either nothing happens or I get error messages of "Invalid Switch" with the /h /r /c and /k switches. What am I doing wrong? Any ideas? Thank you.

Yeah, xcopy is probably not the right tool for the job.
You might find this article to be helpful - it'll explain why, and offer alternatives.

Go to the d: are try this.
xcopy C:\*.* /a /e /k
The above command would copy everything located on the C drive to the drive you are currently on.
Also try.... xcopy /e /y c: d:
(Also put it into your autoexec.bat file for a cheap RAID "hehe")

If you're running Win 98 just follow the ext below. You'll have people telling you it won't work, among other things. I use it all the time with no problem. Guaranteed You just didn't use XCOPY32. Good Luck
To clone your boot drive:
1. Put the new drive in as Master C: drive. Run Fdisk and partition as desired, make partition one active.
2. Format the drive (DO NOT use switch /S - DO NOT COPY SYSTEM FILES TO THE TARGET DRIVE OR THE CLONE WILL
NOT WORK)
3. Return the original boot drive to Master C: and install the new drive as Slave D: or as Master D: if its on the secondary IDE connector.
4. Boot up to Windows, click Start, click Run, now type in: "XCOPY32.EXE /c /h /e /k C:\*.* D:" (without the quotes) (observe spaces,
be sure its exactly as shown above) click OK. A DOS window will appear (do not change to full screen) showing the copy process from
C: to D:, when the clone job is done the DOS window will close (on some windows versions) or just end without comment. When its
done you will know because the action is intense and will end abruptly when finished.Now your new drive is the spittin image of drive C: but will not boot the computer as a slave (or master) in drive D:. If your system fails
you'll have to remove the boot drive and replace it with the clone configured as Master C:. Then it will boot you up just like the original.The XCopy switches used tell DOS to copy Hidden files, all Directories and Sub-directories, System files, read only files and keep long filenames.

You probably are trying to run it in dos standalone. It has to be run in a dos window.
The command that you were using is ok and should work.

"In fact Windows 95/98 XCOPY just launches XCOPY32."
from the aforementioned article, Carlos - in the 'xcopy myths' section.

You could click on This Link and download Xclone. It operates from a DOS window in Windows and does not require switches. It will make an exact duplicate on the new drive, even copying files that are in use. Windows will make a new swap file when the computer is booted from the cloned drive the first time. The swap file is not copyable.

Carlos is 100% correct, until the last sentence:
>and keep long filenames.
That part should have read:
and continue on errors.
The /c switch is the "continue on errors" switch. You need this one, or it will stop when it gets to the swapfile.
Long filenames WILL be preserved though, as long as you run xcopy32 from a DOS prompt within Windows, rather than from stand-alone DOS.
HTH
Dave

Well, a couple more articles
and an interesting series in PCGuide.
The basic gist is that it *can* work, or seem to work, but not necessarily always.
Obviously, ymmv, but it's informative reading, nonetheless.

![]() |
![]() |
![]() |

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