ERASE

From ICE Enterprises
Jump to navigation Jump to search

deletes Midas and non-Midas files in the auxiliary paths

<filename 1:N> The file name of the file to erase.

This command deletes the specified Midas files.  The list of files is only 
limited by the length of the command line.  A given file is deleted from all
disks in the current read aux list, unless you explicitly specify the file 
path.  All versions of the file on any one disk are deleted, unless the file 
name explicitly contains a version number (for example, if you use FIND to 
get the file name).

Normally ERASE assumes the file is a Midas file and attempts to open it
to see whether it has been protected by the FILE PROTECT command.  If the file
is not a Midas file, there may be a system error opening it, possibly preventing
ERASE from deleting it.  The /ALL switch erases files without opening them
(just like an operating system deletion), so it will erase non-Midas files
and PROTECTed files smoothly.


Examples:
  1. Erase all files starting with "my"
       nM> FILES/F=myfiles my*
       nM> FORALL myfiles erase #

  2. Erase several files, but issue a warning if they don't exist
       nM> ERASE/warn=n myfile1 myfile2 myfile3

Switches:
  /ALL      - Erases non-Midas files and protected Midas files as well.
  /QUIET    - Suppresses output on successful deletions.
  /WARN=Y|n - Turn off warnings messages as when when files don't exist.

See Also: FILES