c
c
c
c
Copy
Purpose:
Copies
one
or
more
files
to
another
disk. This
command
also
appends
files
and
copies files
on
the same disk.
Syntax:
copy
Idrive:]pathname
Idrive:]IPathname]
[Iv] [/a]
[Ib]
(to
copy
files)
copy
pathname
+
pathname
...
(to
append
files)
Comments:
If you
do
not specify
the
second
pathname,
the
copy
is
created
on
the default drive and has
the
same name as
the
original file
(first
pathname).
If
the
original file is
on
the
default drive
and
you
do
not
specify
the
second
pathname,
the
copy
command
quits
(you
are
not
allowed
to
copy a file
to
itself), and MS·
DOS
displays
the
following
error
message:
File
cannot
be
copied
onto
itself
o
File(s)
copied
Note If
the
source
and target files are
both
in
the
working direc-
tory, you may use filenames instead
of
complete
pathnames.
The
second
dr;ve:pathname
option
may take
one
of
three
forms:
•
If
the
second
option
is a drive name only, MS·DOS copies
the
original file
to
the
designated drive, keeping
the
original
filename. For example,
the
following
command
makes a
copy
on
drive B named memo. doc:
copy
memo.doc
b:
•
If
the
second
option
is a filename only, MS·DOS copies
the
origi-
nal file
to
one
on
the
default drive, and renames it
with
the
specified filename. For example,
the
following
command
makes
a
copy
of
memo.
doc,
names it letter.doc, and places it
on
the
default drive:
copy
memo.doc
letter.doc
MS-DOS Commands
39
Copy
Copying a file