ERASE Version 5.4 Gene Pizzetta July 1, 1990 ERASE, originally written by Richard Conn, erases read/write files from the command line and prompts for erasure of read-only files. Options allow prompting before each file is erased, inclusion of system files, erasing read-only files without prompting, and erasing all files (*.*) without asking you if you know what you're doing (handy for aliases and batch operations). USAGE: ERASE {dir:}afn.aft{,{dir:}afn.aft{,...}} {{/}options} If no DIR or DU specification is given, the current logged drive and user is assumed. Multiple file specifications must be separated by commas without intervening spaces. OPTIONS: A leading slash is optional. A Erase all (*.*) files without asking. By default if an all files *.* filespec is given, ERASE will prompt with "Erase all files on A0: ?" Using this option will cause all files (except read/only) to be erased without prompting. I Inspect mode. Each matching filename is displayed and the user is prompted. A response of "Y" will cause the file to be erased. Entering "Q" or ^C will exit the program. Any other response will skip the file and then prompt for the next matching filename. R Erase read/only files. By default ERASE will prompt the user if a read/only file is encountered. This option will cause matching read/only files to be erased without prompting. S Toggle inclusion of system files. Whether ERASE recognizes system files by default is determined by a configuration byte in the first record of the COM file preceded by the ASCII string "SYSFILES>". If the byte is zero, system files are ignored; if it is non-zero, system files are erased. The default condition is reversed by this option. As distributed, the default is to exclude system files. If the ZCPR3 quiet flag is set, all screen output is suppressed, except error messages and required prompts. If the R option is not given and ERASE encounters a read/only file, for instance, it prompts for permission to erase the file even if the quiet flag is on. Inspect mode prompts normally at all times. ZEX input is turned off while ERASE is running. On exit the program error flag is set to 10 (source file not found) if no files are erased, unless the program was aborted at a prompt with "Q" or ^C. In addition the number of files erased is entered into ZCPR3 Register 0 (up to a maximum of 255). If an invalid option is given, the program error flag is set to 19 and the error handler is invoked. If a list of files on different drives is given on the command line, the disk free space report is for the last drive accessed by ERASE. HISTORY: Version 5.4 -- July 1, 1990 -- Gene Pizzetta Eliminated internal environment assembly option. Added configuration byte after ASCII string 'SYSFILES>' to chose whether to include system files by default (non-zero) or exclude them by default (0). S option now toggles the default meaning (it's current action is shown by the usage screen). Now filters high bit of filenames for terminals that display special characters that way. At the suggestion of Howard Goldstein, ERASE no longer signs on with its load address and version number; these are displayed only on the usage screen. Restored Q (quit) as a valid response to an erase query, but ^C still works. Display has been made even more compact than last version. Many of these changes are to make the ERASE interface very similar to the RCP version. Program error flag is now set to 10 if no files are erased, unless the program is aborted with a ^C or with a "Q" response to a prompt. If an invalid option is given the program error code is set to 19 and the error handler is invoked. Added disk free space display. Now obeys ZCPR3 quiet flag, except when in inspect mode or when a prompt is necessary (when a read/only file is found, for instance). Removed Wheel byte protection for S and R options. Version 5.3 -- March 25, 1990 -- Gene Pizzetta Added A option to suppress "Erase all files?" question when "*.*" is given as a filespec. This option is primarily for use in alias scripts and batch files, where you might want to clear a directory without ERASE stopping to ask if you know what you're doing. Rick Charnes added some nice features in v5.2, but succeeded in badly messing up the display for all prompted erasures. That has been corrected and the Q (quit) option has been eliminated. Instead, ^C now aborts ERASE at any prompt. Version 5.2 -- January 24, 1989 -- Rick Charnes Three changes: (1) Now turns off ZEX input while program is running. This is important when ERASE.COM is used in an alias inside a ZEX file under certain circumstances and ERASE.COM requires user input, such as if its Inspect option is used or if R/O files are encountered. Otherwise the ZEX script itself would be sent willy-nilly into the prompt rather than allowing the user to do so. (2) The ZCPR3 error flag is set if program did not erase any files. This can be useful in aliases when the correct execution of the remainder of an alias is dependent on a successful erasure. The error flag is cleared if any files were successfully erased. (3) ZCPR3 register "0" is set to the number of files successfully erased. This can also be nice for aliases. I always liked this concept, for which my inspiration was Jay Sage's doing the same thing with FF.COM, which sets ZCPR3 register 0 to the number of files successfully found. Version 5.1A -- December 30, 1987 -- Bruce Morgen Fix option parser as per RENAME32, strip high bit when printing program's actual name for help screen, wheel byte checked before granting "S" or "R" option, or help text on these options. Version 5.1 -- December 21, 1987 -- Bruce Morgen Z80 opcodes, Zilog mnemonics, and ZCPR33 Type 3 format. Usage message gives correct COMfile name of program. Following Howard Goldstein's (LX17 & 18) lead, the ZCPR 3.3 parser is used if it's available. Version 5.0 -- May 18, 1984 -- Richard Conn Version 4.0 -- January 16, 1983 -- Richard Conn Version 3.3 -- January 6, 1983 -- Richard Conn Version 3.2 -- December 7, 1982 -- Richard Conn Version 3.1 -- November 9, 1982 -- Richard Conn Version 3.0 -- October 18, 1982 -- Richard Conn Version 2.0 -- November 18, 1981 -- Richard Conn Version 1.4 -- October 26, 1981 -- Richard Conn Version 1.3 -- October 25, 1981 -- Richard Conn Version 1.2 -- April 12, 1981 -- Richard Conn Version 1.1 -- October 19, 1980 -- Richard Conn Version 1.0 -- June 14, 1980 -- Richard Conn