Q. How to copy several files in one stroke?
The COPY command can also be used to copy several files in one stroke by using wildcards. For example, consider the following commands:
C :\> COPY C:*. DOC A:
C :\> COPY C: SALE?. REP A:
The first COPY command copies all file having the extension name DOC in the current directory in drive C to a disk in drive A. The second command copies files such as SALE1. REP, SALE 2. REP and SALE.REP from the current directory in drive C to a disk in drive A.
While using the COPY command (or for that matter, any dos command), if you do not specify the path, DOS assumes that you are referring to the currently selected drive and directory. For instance, consider the following command:
C :\> COPY COMMAND.COM A:
C: \ WORD> COPY DASTA 1.DOC A:
In the first command, the drive and directory names are not specified with COMMAND.COM. However, as drive C is the currently selected drive and the root directory is selected (prompt is 'C :\>'), DOS assumes that you are referring to the root directory of drive C. Accordingly, it looks for the COMMAND.COM file in the root directory of drive C. similarly, the next COPPY command looks for DATA1.DOC file in the WORD directory in drive C, as C:\WORD is the current directory and no path is specified with the DATA1.DOC.