Technical data
Managing a DOS File System
303561-A Rev 00
5-15
Copying a File
Use the
copy
command to make a copy of a file. You can use the wildcard
characters
*
and
?
when issuing the
copy
command to copy multiple files. The
new file must reside on the same diskette as the original. (Use a PC to copy a file
from one diskette to another.)
Enter the following command to copy a single file in the present working
directory and rename the new version of the file:
copy
<old_name.ext> <new_name.ext>
Enter the following command to copy a file from one directory to another, and use
the same file name:
copy \
<dir_1>
\
<old_name.ext>
\
<dir_2>
Enter the following command to copy a file from one directory to another, and use
a new file name:
copy \
<dir_1>
\
<old_name.ext>
\
<dir_2>
\
<new_name.ext>
Examples:
Caution:
The system automatically overwrites any file in the directory that
has the same file name as the file you are copying. To avoid overwriting an
existing file, display the directory and determine the file names that are already
in use.
copy config alt.cfg
Copies the
config
file in the present working directory
and names the new copy
alt.cfg
copy *.* \newfiles
Copies all files in the present working directory to the
directory
newfiles
copy \logf\l6_22.log
\inv\span.log
Copies the
l6_22.log
file from the
logf
directory to the
inv
directory and names the new file
span.log