* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * E R A Z * * * * A ZCPR3-Compatible File Erasing Utility * * * * * * Copyright (c) 1987-91 * * by * * Terry Hazen * * 21460 Bear Creek Road * * Los Gatos, CA 95030 * * * * Voice.......... (408) 354-7188 * * Zee-Machine.... (408) 245-1420 * * Ladera Znode... (213) 670-9465 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Latest Revision --------------- Version 1.5a - 01/22/91. See ERAZ15a.HIS for revision details. ================================================================= Overview -------- ERAZ is an enhanced Z80 file erasing utility for use with CP/M 2.2 or ZCPR3 CCP's running under CP/M 2.2, Z80DOS, ZRDOS, ZSDOS and other extended DOS's. ERAZ has not been tested with CP/M 3.0. ERAZ was developed as a fast, general purpose file erasing utility with flexible command line option control over many aspects of the erasing process, as well as a companion to the ACOPY series of file utilities. It can help reduce the ALIAS command line length required to erase groups of files with unrelated names by optionally erasing only those files that have any of the specified filename attributes (the high bits of the filename and filetype bytes) F1 through F7 set (erase if ANY of the selected attributes are set). Filename attributes may be set using the ZCPR3 utility DFA (Define/display File Attributes) or a similar CP/M Public Domain utility such as DA. See the 'Options' section for information on the rest of the ERAZ's command line options. ERAZ is fully ZCPR3 compatible when operating in a ZCPR3 environment, accepting both the DIR: and DU: forms and checking the environment for the validity of the drive and user specified, whether it is to be operating in a quiet environment and the name the program was called by for use in the command line HELP message. ERAZ will operate using the ZCPR3 GO command. Errors will cause the ZCPR3 program error flag to be set. When operating in a ZRDOS environment, files in the PUBLIC areas are protected. When ERAZ operates in a non-ZCPR3 environment, the required information is obtained from internal locations, which may be patched to suit your system as described in the file ERAZ.PAT. ERAZ will not accept the DIR: form when operating in a non-ZCPR3 environment. Installation ------------ The distribution version of ERAZ is supplied with a Z3ENV address of 0000H, ready for use in ZCPR33+ environments. ZCPR30 users should install ERAZ using their regular installation methods. No installation is required for operation in non-ZCPR3 environments. However, several locations affecting program operation may be patched as described in the file ERAZ.PAT, although the default values should be satisfactory for most users. Syntax ------ To help you clear your workspace with a single command, ERAZ allows you to specify up to 18 separate ambiguous filenames on the command line. The syntax is: ERAZ [dir:]afn1 [[dir:]afn2 ...] [>excluded] [/option(s)] Normally the default dir: specification is the currently logged dir:, and is carried over to filenames without a specified dir:. Use of the 'C' option changes the default to the last specified dir: so that it will carry over to subsequent filenames without a specified dir:. Any other options also specified, including any excluded filename mask, will be applied to all filenames. Whenever you include the wildcard filename mask '*.*' (unless you also specify the Inspect (/I) or the Override (/O) options), ERAZ will ask you if you want to "Erase ALL Files?" and will await your response before all specified files are erased. This is to help prevent accidentally erasing all your files due to the slip of a finger. Any response except 'Y' or 'y' will cause ERAZ to abort at that point. If you specify the Override option, which is primarily intended for use in alias command lines, ERAZ will erase all files, as specified, WITHOUT first warning you. If you do accidentally erase any files, IMMEDIATELY use an file unerasing utility such as UNERAZ, UNERA, or UNERASE -BEFORE- performing any operations that will write any files to your disk! Disk write operations may reuse any directory entries marked as erased, and thereby make it impossible to recover your erased files or may result in only partially recovering erased files. Excluding Files --------------- You may sometimes want to erase a group of files specified by a filename/attribute mask which also includes some files you don't want erased. You can optionally add a filename mask to specify files that you wish to exclude from erasing, even if they otherwise match the source file specification. The exclusion filename mask may be located anywhere in the command line, but since ERAZ allows multiple filename specifications, the exclusion filename mask must be prefixed by the exclusion filename flag character. The exclusion filename is a filename mask only, and any drive/user specified will be ignored. For example: A0:WORK>eraz util:files*.* fubar.* >*.com will erase all files UTIL:FILES???.??? and A0:FUBAR.???, but won't erase any files named ????????.COM. Options ------- ERAZ has a number of command line options, which must be preceded by the option flag character '/'. The option letters or numbers may appear in any order and may appear anywhere in the command line. Options may be combined in any combination. Options are toggled as they are read, so that an option appearing twice will cancel itself. All of the following command lines have the same meaning: A0>eraz afn1 afn2 >excluded.fn /12q A0>eraz afn1 /1 >excluded.fn afn2 /2q A0>eraz >excluded.fn /12 afn2 /q afn1 A0>eraz /q /q afn1 >excluded.fn /q /21 afn2 The following descriptions of the options reflect the default option settings in the distribution version. You may change the default option settings to suit your own needs by patching. See ERAZ.PAT for more information. The command line HELP screen will automatically display the proper selection message for each option based on whether it has been set to ON or OFF. The options are: 1 - 7 options. Erases only those specified files which also have the selected combination of the F1 through the F7 attributes set. N - Erases only NON-archived files. Under ZRDOS, ZSDOS and other extended DOS's, the 'N' option allows you to limit erasing to non-archived files (those files that have been modified since the archive attribute was set). Under CP/M 2.2, the archive attribute is not reset when a file is updated, so this option is not too useful unless you use a utility program to 'manually' set or reset the archive attribute. A - Erases both directory and system files. The default is to erase directory files only. O - Overrides the 'Erase ALL Files?' question when specifying all files (*.*). Normally, you are warned and asked. R - Erases R/O files without asking. Normally, you are asked first. C - Carry over the last specified drive/user as the default to succeeding filename mask specifications. Normally the currently logged du: is the default. The C option allows you to erase files on a du: different from the currently logged du: without having to specify the new du: each time you specify a different filename mask. If this option is patched to be normally ON, selecting the C option will then make the currently logged du: the default. I - Inspect option. Displays each proposed erase and asks for operator approval before proceeding. The default is to automatically erase R/W files without asking. Q - Quiet option. Turns off non-error messages. Any information you should know about during the erasing process, such as error information, is still displayed. Will not erase any system or R/O files unless the A or R options are also used. When operating in a ZCPR3 environment, the Q option initial setting will automatically be set according to the state of the ZCPR3 QUIET flag. If the Q option has an initial setting of ON, the use of Q in the command line will then toggle the Q option OFF. The HELP screen will automatically display the proper meaning of the Q option. ZCPR3 Program Error Flag ------------------------ ERAZ sets the ZCPR3 program error flag, if it exists, when an error occurs during program operation. For more flexible use in alias and ZEX scripts, ERAZ follows the convention set by Rick Charnes by setting the error flag to the following values for the indicated error conditions: 8 = User abort 0FFH = Fatal error (which will terminate ERAZ operation) Optional ERAZ Modifications ----------------------------- ERAZ has a number of locations near the beginning of the program that can be patched using ZP, ZPATCH, DDT, etc, to alter the operation of the program to suit the user. ERAZ.PAT may also be renamed, assembled to an overlay file and overlaid on ERAZ.COM to create a custom copy of ERAZ.COM. ZCNFG17.COM and the configuration file ERAZ15.CFG may also be used to change some of ERAZ.COM's more common user-configurable settings. See ERAZ.PAT for further information.