XCOPY+Copying Selected Files
Allows you to selectively copy groups of files.
MS-DOS equivalent: XCOPY (3.2+)
[d:][path] XCOPY [sd:][spath]sfilename
[d:][path] Specifies the drive letter and
path that contain the XCOPY
[sd:][spath]sfilename Specifies the drive,
directory, or file that you
want XCOPY to copy from
[td:][tpath][tfilename] Specifies the drive,
directory, and file name that
you want the file(s) copied to
/A Copies only those files whose
archive bit is set to on.
/D Copies only those files whose
date is the same or later than
the date specified in the form
/D:mm-dd-yy, /D:dd-mm-yy, or
/E Creates subdirectories on the
target when used with the /S
option even if the
in the source are empty;
otherwise they are not
/M Copies files whose archive bit
is set to on and also clears
the archive bit.
/P Prompts before copying each
/S Copies files in subdirectories
as well as in the source
subdirectories if necessary.
/V Instructs DOS to verify that
all files have been written
/W Prompts you to press any key
before copying files, thus
allowing you to insert a new
The XCOPY command is used to copy files by specifying only a
directory or drive without indicating file names.
XCOPY A:\ C:\
copies all files in the root directory of the disk in drive A to
the root directory of drive C.
XCOPY B: /D:11-22-87
copies all files dated on or after November 22, 1987, from a disk
in drive B to the current directory.
XCOPY C:\REPORTS D:E
copies all files in the REPORTS subdirectory on drive C as well
as all files in its subdirectories to drive D and creates
equivalently named subdirectories, even if they are empty.
XCOPY C: A:M
copies all files on drive C that have changed since the last
backup and clears the archive bit after the copy.
Cannot perform a cyclic copy
You probably specified the /S option while the source was
directly above the destination subdirectory, so the destination
is considered to be part of the source. Use a temporary file or
disk to contain the source directory at the same or a lower level
than the destination directory.
Cannot XCOPY from a reserved device
You have specified a printer or an asynchronous port as the
source. The source must be a file. Put the source data into a
file and reissue the XCOPY command.
Does path name specify a file or directory name
on the target (F = file, D = directory)?
XCOPY did not find a directory named path name. Enter D if you
are copying a directory or F if you are copying only one file.
File cannot be copied onto itself
You tried to copy a file using the same name, directory, and disk
as the original. Reissue the XCOPY command, using a different
name, or direct the copy to a different disk.
The source file is locked. Try again after a short time.
Too many open files
You need to reconfigure the system. Increase the FILES= value in
your CONFIG.SYS file if it is less than 20.
XCOPY allows you to copy only files whose archive bit is on,
indicating whether it has been backed up since its last change,
if you have used the /A or /M option. XCOPY works only within a
single directory unless the /S option is specified. The /S option
does create subdirectories, but it does not replicate empty
subdirectories unless used with the /E option.
DEL (DELETE) and ERASE Commands
RENAME (REN) Command
|file: /Techref/dos/command/xcopy.htm, 5KB, , updated: 2007/8/6 06:27, local time: 2023/6/4 06:22,
|©2023 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://massmind.org/techref/dos/command/xcopy.htm"> dos command xcopy</A>
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to massmind.org!