blank.gif (43 bytes)

Church Of The
Swimming Elephant




Default value for destination

If you omit destination, the xcopy command copies the files to the current directory.

Specifying whether destination is a file or directory

If destination does not contain an existing directory and does not end with a backslash (\), xcopy prompts you with a message in the following format:

Does destination specify a file name
or directory name on the target
(F = file, D = directory)?

Press F if you want the file(s) to be copied to a file. Press D if you want the file(s) to be copied to a directory.

You can avoid this prompt by using the /i switch. If the /i switch is used xcopy assumes the destination is a directory if the source is more than one file or a directory.

Xcopy sets archive attribute for destination files

Xcopy creates files with the archive attribute set, whether or not this attribute was set in the source file. For more information about file attributes, see the attrib command.

Xcopy vs. diskcopy

If you have a disk that contains files in subdirectories and you want to copy it to a disk that has a different format, you should use the xcopy command instead of diskcopy. Since the diskcopy command copies disks track by track, it requires that your source and destination disks have the same format. Xcopy has no such requirement. In general, use xcopy unless you need a complete disk image copy.

Xcopy exit codes

The following list shows each exit code and a brief description of its meaning:

Files were copied without error.
No files were found to copy.
The user pressed CTRL+C to terminate xcopy.
Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line.
Disk write error occurred.

You can use the errorlevel parameter on the if command line in a batch program to process exit codes returned by xcopy. See Examples.

More Information About Xcopy

ntcmds00000001.gif Xcopy--Examples

ntcmds00000001.gif Xcopy


Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

Have you gone to church today?
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609