To copy the file named
REPORT
to the same diskette and
name the copy
FACTS,
type the following and press
Enter:
COPY REPORT FACTS
Now you have two files on the default drive that have the same
contents but different names. In this example, you can omit the
drive designators because the original file and the copy are both
on the current drive.
Using wildcards
An easy way to copy a group of files is by using wildcard
characters in the filenames. You can use two wildcards:
* and ?. The asterisk represents any group of characters and
the question mark represents any single character.
For example, to copy all the files on the diskette in drive A to
the diskette in drive B, type the following and press
Enter:
COPY A:*.* B:
To copy all files with names that begin with the four letters
MEMO and end with any single character (such as MEMO1),
type the following and press
Enter:
COPY A:MEMO? B:
You can also use the COPY command to combine several files
into one. For example, to create a new file called DATA that
consists of the files REPORT, FACTS, and MEMO, type the
following and press
Enter:
COPY FACTS + MEMO DATA
Now the file DATA consists of REPORT followed by FACTS
followed by MEMO.
Using MS-DOS With Your Computer
3-11