[Guide to AmigaDOS 3\Copy] 


Format: COPY [FROM] {<name|pattern>} [TO] <name|pattern> [ALL] [QUIET] [BUF|BUFFER=<n>] [CLONE] [DATES] [NOPRO] [COM] [NOREQ] Template: FROM/M, TO/A, ALL/S, QUIET/S, BUF=BUFFER/K/N, CLONE/S, DATES/S, NOPRO/S, COM/S, NOREQ/S Purpose: To copy files or directories. Path: C:COPY Specification: COPY copies the file or directory specified with the FROM argument to the file or directory specifed by the TO argument. You can copy several items at once by giving more than one FROM argument; each argument should be separated by spaces. You can use pattern matching to copy or exclude items whose names share a common set of characters or symbols. If a TO filename already exists, COPY overwrites the TO file with the FROM file. If you name a destination directory that does not exist, COPY will create a directory with that name. You can also use a pair of double quotes ("") to refer to the current directory when specifying a destination. Do not put any spaces between the double quotes. If the FROM argument is a directory, only the directory's files will be copied; its subdirectories will not be copied. Use the ALL option to copy the complete directory, including its files, subdirectories, and the subdirectories' files. If you want to copy a directory and you want the copy to have the same name as the original, you must include the directory name in the TO argument. COPY prints to the screen the name of each file as it is copied. This can be overridden by the QUIET option. The BUF= option is used to set the number of 512-byte buffers used during the copy. (Default is 200 buffers, approximately 100KB of RAM.) It is often useful to limit the number of buffers when copying to RAM:. BUF=0 uses a buffer the same size as the file to be copied. Normally, COPY gives the TO file the date and time the copy was made, rather than the date and time the file was created or last revised. Any comments attached to the original FROM file are ignored. The protection bits of the FROM file are copied to the TO file. Several options allow you to override these defaults:


The creation or last revised date (whichever is most recent) of the FROM file is copied to the TO file.


Any comment attached to the FROM file is copied to the TO file.


The protection bits of the FROM file are not copied to the TO file. The TO file will be given standard protection bits of r, w, e and d.


The creation (or last revised) date, comments and protection bits of the FROM file are copied to the TO file. Normally, COPY displays a requester if the COPY cannot continue for some reason. When the NOREQ option is given, all requesters are suppressed. This is useful in scripts and can prevent a COPY failure from stopping the script while it waits for a response. For example, if a script calls for a certain file to be copied and the system cannot find that file, normally the script would display a requester and would wait until a response was given. With the NOREQ option, the COPY command would be aborted and the script would continue. Example 1: 1> COPY File1 TO :Work/File2 Copies File1 in the current directory to the File2 directory in the Work directory. Example 2: 1> COPY ~(#?.info) TO DF1:Backup Copies all the files not ending in .info in the current directory to the Backup directory on the disk in DF1:. This is a convenient use of pattern matching to save storage space when icons are not necessary. Example 3: 1> COPY Work:Test TO "" Copies the files in the Test directory on Work to the current directory; subdirectories in Test will not be copied. Example 4: 1> COPY Work:Test TO DF0:Test ALL Copies all the files and any subdirectories of the Test directory on Work to the Test directory on DF0:. If a Test directory does not already exist on DF0:, AmigaDOS will create one. Example 5: 1> COPY DF0: TO DF1: ALL QUIET Copies all files and directories on the disk in DF0: to DF1:, without displaying on the screen any file/directory names as they are copied. (This is quite slow in comparison to DiskCopy.)

Converted from AmigaGuide format to basic HTML by Jaruzel.