COPY Copies files or directories. Format COPY [FROM] {} [TO] [ALL] [quiet] [BUF | BUFFER=] [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 Location C: COPY copies the file or directory specified with the FROM argument to the file or directory specified by the TO argument. You can copy several items at once by giving more than one name/pattern in the FROM argument; they should be separated by spaces. If the FROM argument is a pattern or consists of multiple names, the TO argument must be a directory. If a TO file name already exists, COPY overwrites the TO file with the FROM file. You can use a pair of double quotation marks ("") to refer to the current directory. When used as the FROM argument, "" copies all the files in the current directory. Do not put any spaces between the double quotation marks. If the FROM argument is a directory, only the directory's files are copied; its subdirectories are not copied. Use the ALL option to copy the complete directory, including its files, subdirectories, and the subdirectories' files. It is possible to create a directory as you copy if you are copying more than one file. To give the new directory a name, specify the directory name as the last component in the TO argument's path. This can be any name, including the same name as the original if it is a different path. 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 128 buffers, 64 KB of RAM.) Limit the number of buffers when copying to RAM:. BUF=0 uses a buffer the same size as the file to be copied. By default, COPY gives a TO file the timestamp of when the copy was made, rather than that of the original file. Also by default, comments attached to the original FROM file are not copied and the protection bits of the FROM file are copied to the TO file. You can override these defaults using the following: CLONE The timestamp, comments, and protection bits of the FROM file are copied to the TO file. DATES The timestamp of the FROM file is copied to the TO file. COM Any comment attached to the FROM file is copied to the TO file. NOPRO The protection bits of the FROM file are not copied to the TO file. The TO file is given standard protection bits or r, w, e, and d. COPY displays a requester if the COPY cannot continue. When the NOREQ option is given, all requesters are suppressed. Use this in scripts to prevent a COPY failure from stopping the script to wait for a response. With the NOREQ option, the COPY command is aborted and the script continues. Example 1: 1> COPY File1 TO :Work/File2 copies File1 in the current directory to the Work directory in the root of the current device, renaming it File2. Example 2: 1> COPY Chapter#? TO DF1:Backup copies all the files whose names start with Chapter in the current directory to the Bakkup directory on the disk in DF1:. The Backup directory is created if it does not already exist. Example 3: 1> COPY Work:Test TO " " copies the files in the Test directory on Work to the current directory; subdirectories in Test are not 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:, COPY creates 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. (For disks less than half full, this can be faster than DiskCopy.) For more examples using COPY, see Chapter 8.