CP - Copy files (DEC Rainbow or IBM PC); Version 3.3 cp [-!bdfipqv7] file,file,... [target] Filespecs may contain a drive and/or a directory specification and wildcard characters. If only one file is being copied, the target may be a file name or a drive and/or directory name. In the latter case, the source file name is used in the target drive and/or directory. If multiple filespecs are given or wildcard characters are used, the target must be a drive and/or directory name only. The file name of each file copied is used to make the target file name. If a source filespec contains a drive and/or directory, these are passed along to the subsequent source filespecs until reassigned; thus cp \src\*.c,*.obj,\exe\*.* b: is the same as cp \src\*.c,\src\*.obj,\exe\*.* b: and cp b:bob,carol,\tmp\ted,alice \bed is shorthand for cp b:bob,b:carol,b:\tmp\ted,b:\tmp\alice \bed If a target file exists, CP normally asks for verification before overwriting. If there is not enough room on the target disk for the copy, the program pauses while the user changes disks; the copy then proceeds. If the target is specified as 2: drive A will be used until full. Drive B is then used; when B fills, the program pauses while you change disks and then starts over with A. This is useful for backups. If a target directory is specified and does not exist, it will be created. The default target is the current directory. Options: -a (attributes) Causes the target file to inherit the attributes (read-only, hidden, etc.) of the source file. Normally the target file is created read/write, non-hidden, non-system, with the archive bit clear (e.g. not backed up). -b (backup) Used to backup hard disk onto floppies. -b implies -pf (see below). If no target is specified, 2: is assumed. On the DEC Rainbow only, CP will delete all files and sub- directories on each new floppy inserted. This allows you to make backups onto the floppies without having to erase them manually beforehand. For this reason, CP requests confirmation if -b is specified before beginning the backup. -d (delete after copy) Each source file is deleted without confirmation if the copy was successful. -f (flag) The archive flag is set in each source file after it has been successfully copied indicating the file has been backed up. -i (input) The list of files to copy is taken from the standard input rather than the command line. Thus with -i the format of cp is cp -i [-adqsv!] target This is useful when using cp as a filter. e.g. ls -fm | cp -i a: copies files in order from smallest to largest. This insures that the most files will be copied to a: before it fills. -p (path) The target must be a drive letter followed by a colon. If a directory (path) specification is present for a source file, it will be copied to a path of that name on the target drive. Directories are created as needed. The command cp -p \exe\*.*,\src\*.* a: will copy files to directories a:\exe and a:\src ls -rf e:\ | cp -ip 2: will backup up all of drive E onto floppies, using drives A and B. -q (quiet) Supresses informational copy messages. -v (verify) Causes user confirmation to be requested before copying. At each file prompt the user answers either Y (do the copy), ! (do the copy and don't ask for confirmation on future files), or N (don't copy this file). Any other answer is the same as N. -! (hammer!) Supresses the verification which is normally requested (even without -v) before overwriting an existing file. -7 (7-bit) Clears the high-order bit of each byte in the target file. Useful for removing parity bits after serial transfer or for stripping word-processor inserted flags. Options may be combined as in cp -q! ... The CP! command is a shorthand for cp -!. Usage is cp! [-adipqv7] file,file,... target Copyright (c) 1985,86,87, Bryan Higgins. The author may be reached/rewarded at 1802 Channing Way Berkeley, CA 94703 One of the Kramden Utilities.