You can learn more about this command in this book: DOS the Easy Way
Type: Internal (1.0 and later)
COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B]
COPY [/Y|-Y] [/A][/B] [d:][path]filename+[d:][path]filename[...]
Purpose: Copies or appends files. Files can be copied with the
name or with a new name.
COPY is usually used to copy one or more files from one location to
However, COPY can also be used to create new files. By copying from the
keyboard console (COPY CON:) to the screen, files can be created and then
The first filename you enter is referred to as the source file. The
filename you enter is referred to as the target file. If errors are
during the copying process, the COPY program will display error messages
Unlike the BACKUP command, copied files are stored in the same format
found in. The copied files can be used just as you would use the
(whether the copied file is a data file or a program).
COPY can also be used to transfer data between any of the system
may also be combined during the copy process.
Files can be copied to the same directory only if they are copied with a
name. If you copy a file to a different directory without specifying a
name, the file will be copied with the same name. If you attempt to copy
to the same directory without providing a new name, DOS will cancel the
display the message
File cannot be copied onto itself
The COPY command was also discussed in Chapter 1, Introduction.
/Y - Causes COPY to replace existing files without providing a
prompt. By default, if you specify an existing file as the destination
COPY will provide a confirmation prompt. (In previous versions of DOS,
existing files were simply overwritten.)
/-Y - Displays a confirmation prompt before copying over existing
/A - Used to copy ASCII files. Applies to the filename preceding it
all following filenames. Files will be copied until an end-of-file mark
encountered in the file being copied. If an end-of-file mark is
the file, the rest of the file is not copied. DOS will append an
mark at the end of the copied file.
/B - Used to copy binary files. Applies to the filename preceding it
all following filenames. Copied files will be read by size (according to
number of bytes indicated in the file`s directory listing). An
is not placed at the end of the copied file.
/V - Checks after the copy to assure that a file was copied
the copy cannot be verified, the program will display an error message.
this option will result in a slower copying process.
The first filename you enter is the source file; the second file is the
file. To copy the file TEST.DOC from the current directory to drive B
same name), enter
copy test.doc b:
To copy the file TEST.DOC to the current directory with the new name,
copy test.doc test2
To copy and combine (concatenate) the files TEST1.DOC and TEST2.DOC to a
file, TEST3, enter
copy test1.doc+test2.doc b:test3
You can also combine files by using wildcard characters (? and *). To
files with a .DOC filename extension on drive C to a new file ALLDOCS on
copy c:*.doc b:alldocs
Other, more complicated, combinations are also possible while copying.
example, to combine all files with a .TXT filename extension with all
have the same filename and a .DOC extension, copying the newly combined
a new file on drive B with an .ADD extension, enter
copy *.txt+*.doc b:*.add
In this case, the file TEST.TXT will be combined with the file TEST.DOC
resulting in a combined file with the filename TEST.ADD.
Back to the