;
                                  ERASE.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
ERASE57.COM    4k (26)   F876  5.7        Bruce Morgen 11/91       Z3COM6
ERASE57.3OM    4k (26)   1EB1  5.7        Bruce Morgen 11/91       Z3COM6
ERASE57.4OM    4k (32)   3EC7  5.7        Bruce Morgen 11/91       Z3COM6

  1- Syntax/Options  2- Usage  3- Configuration  4- Notes                     


   ERASE is the transient counterpart of ERA.   It erases a list of files from
one or more directories.   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).  

   Vs. 5.0 (5/84) by R. Conn.
:1
 Syntax   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 - 1/2   

   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.  The prompt can be eliminated by default w/ ZCNFG.

   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.   Erasing  read-only files
        can be made the default with ZCNFG.
 Options 2/2 

   S    Toggle inclusion of system  files.   Whether ERASE  recognizes  system
        files by default is determined  by  a configuration  byte that  can be
        changed with ZCNFG.  The default condition is reversed by this option.
        As distributed, the default is to exclude system files.

   Q    Toggle current default quiet mode.   Defaults to quiet flag,  if it is
        on.   Otherwise, defaults to configured quiet mode that can be changed
        with ZCNFG.  As distributed, the default is verbose mode.
:2
 Usage 

   In quiet mode,  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).   An invalid option will set the error flag to 19,  and, if
runnning under ZCPR3.3 or higher,  an invalid directory reference will set the
error flag to 2.   The latter two errors will  cause the  error  handler to be
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.
:3 
 Configuration 

   All command line options,  except inspect  mode,  can  be  made the default
using ZCNFG and the accompanying ERASEnn.CFG file.  If the name of the config-
uration file is not changed, ZCNFG will always be able to find it, even if you
change the name of ERASE.COM.

   Configuring ERASE to delete read-only files  without prompting is possible,
but not  recommended unless you are  absolutely  sure  you  are  aware  of the
implications.
:4
 ERASE Notes - 1/5 

   a. Version 5.7 updates (Bruce Morgen, 11/14/91):
      - Implemented a 32-record  (4K) Type 4  version  using the rather kludgy
        methodology of W v2.4 and a modified  MYSORT module called SUBSRT that
        prevents  DIRQ  from  pulling  in   SYSLIB's  powerful-but-huge   SORT
        routine.
      - Enhanced the program banner by including the COMfile Type.  
      - Added a call to Z3LIB's ZSYSCHK to make the 100h Type 3 CP/M-safe.
      - Like MYSORT,  SUBSRT does a  Shell-Metzner sort  without  the use of a
        pointer table and seems to be adequately fast for ERASE's needs  while
        saving over 200 bytes.  
      - It's probably somewhat irrational,  but I feel that  a  tool that does
        nothing but erase files should not  exceed 4K  and  that  file erasure
        should be available in the Type 4  format to  minimize  low-TPA  usage
        under Z34-compatible CPRs, just as Joe's ERA provided with NZCOM does.
        Aside from the above,  ERASE v5.7 is functionally  identical to Gene's
        excellent v5.6,  although the new  downward  buffer sizing  code might
        make the new Type 4  a smidgen  slower  (probably  most  noticeable on
        floppies).
 ERASE Notes - 2/5 

   b. Version 5.6 updates (Gene Pizzetta, 11/04/90):
      - Fixes bug where usage screen was not  reflecting the current effect of
        the S option.

   c. Version 5.5 updates (Gene Pizzetta, 11/03/90):
      - Adds Q option to toggle default quiet mode, which is controlled by the
        ZCPR3 quiet flag or a  new  quiet  configuration byte.   In fact,  all
        command line options,  except I,  can now be configured as the default
        mode with ZCNFG.  
      - Now displays DU specification with each filename,  so you can  be sure
        which directory ERASE is working on.  
      - If run under ZCPR33+,  now reports invalid directory instead of trying
        to erase files on default drive.  What a disaster that could be!

   d. Version 5.4 updates (Gene Pizzetta, 7/01/90):
      - 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).  
 ERASE Notes - 3/5 

      - 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.  
      - 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.
 ERASE Notes - 4/5 

   e. Version 5.3 updates (Gene Pizzetta, 3/28/90):
      - Adds "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.  
      - Display cleaned up for prompted erasures.
      - Q (quit) option has been eliminated.   Instead, ^C now aborts ERASE at 
        any prompt.

   f. Version 5.2 updates (Rick Charnes, 1/24/89):
      - Turns off  ZEX input  while  running.   This is  important  under some 
        circumstances when  ERASE is in  an  alias  running  in  a  ZEX  file, 
        allowing the user rather than the ZEX script to answer a prompt.
      - Sets ZCPR3 error flag if no files were erased.
      - The number of files erased is put into ZCPR3 register "0".
 ERASE Notes - 5/5 

   g. Version 5.1A updates (Bruce Morgen, 12/30/87):
      - Fix option parser as per RENAME32, strip high bit when printing prog-
        ram's actual name for help screen
      - Wheel byte checked before granting "S" or "R" option,  or help text on
        these options.

   h. Version 5.1 updates (Bruce Morgen, 12/21/87):
      - Rewrite in Z80 opcodes, Zilog mnemonics and ZCPR33 Type 3 format.  
      - ZCPR 3.3 parser used if available.
      - Help message gives the correct COMfile name of the program.  
