Library /sys$common/syshlp/helplib.hlb  —  DELETE  file  Examples
    1.$ DELETE COMMON.SUM;2

      The DELETE command deletes the file COMMON.SUM;2 from the
      current default disk and directory.

    2.$ DELETE *.OLD;*

      The DELETE command deletes all versions of files with file type
      .OLD from the default disk directory.

    3.$ DELETE  ALPHA.TXT;*, BETA;*, GAMMA;*

      The DELETE command deletes all versions of the files ALPHA.TXT,
      BETA.TXT, and GAMMA.TXT. The command uses the file type of the
      first input file as a temporary default. Note, however, that
      some form of version number (here specified as the asterisk
      (*)  wildcards) must be included in each file specification.

    4.$ DELETE /BEFORE=15-APR/LOG *.DAT;*
      %DELETE-I-FILDEL, DISK2:[MAIN]ASSIGN.DAT;1 deleted (5 block)
      %DELETE-I-FILDEL, DISK2:[MAIN]BATCHAVE.DAT;3 deleted (4 blocks)
      %DELETE-I-FILDEL, DISK2:[MAIN]BATCHAVE.DAT;2 deleted (4 blocks)
      %DELETE-I-FILDEL, DISK2:[MAIN]BATCHAVE.DAT;1 deleted (4 blocks)
      %DELETE-I-FILDEL, DISK2:[MAIN]CANCEL.DAT;1 deleted (2 blocks)
      %DELETE-I-FILDEL, DISK2:[MAIN]DEFINE.DAT;1 deleted (3 blocks)
      %DELETE-I-FILDEL, DISK2:[MAIN]EXIT.DAT;1 deleted (1 block)
      %DELETE-I-TOTAL, 7 files deleted (23 blocks)

      The DELETE command deletes all versions of all files with file
      type .DAT that were either created or updated before April 15
      of this year. The /LOG qualifier not only displays the name of
      each file deleted, but also the total number of files deleted.

    5.$ DELETE A.B;

      The DELETE command deletes the file A.B with the highest
      version number.

    6.$ DELETE/CONFIRM/SINCE=TODAY [MEIER.TESTFILES]*.OBJ;*
      DISK0:[MEIER.TESTFILES]AVERAG.OBJ;1, delete? [N]:Y
      DISK0:[MEIER.TESTFILES]SCANLINE.OBJ;4, delete? [N]:N
      DISK0:[MEIER.TESTFILES]SCANLINE.OBJ;3, delete? [N]:N
      DISK0:[MEIER.TESTFILES]SCANLINE.OBJ;2, delete? [N]:N
      DISK0:[MEIER.TESTFILES]WEATHER.OBJ;3, delete? [N]:Y

      The DELETE command examines all versions of files with file
      type .OBJ in the subdirectory [MEIER.TESTFILES], and locates
      those that were created or modified today. Before deleting each
      file, it requests confirmation that the file should be deleted.
      The default response-N-is given in brackets.

    7.$ DIRECTORY [.SUBTEST]
      %DIRECT-W-NOFILES, no files found
      $ SET SECURITY/PROTECTION=(OWNER:DELETE) SUBTEST.DIR
      $ DELETE SUBTEST.DIR;1

      Before the directory file SUBTEST.DIR is deleted, the DIRECTORY
      command is used to verify that there are no files cataloged in
      the directory. The SET SECURITY/PROTECTION command redefines
      the protection for the directory file so that it can be
      deleted; then the DELETE command deletes it.

    8.$ DELETE DALLAS"THOMAS SECRET"::DISK0:[000,000]DECODE.LIS;1

      This DELETE command deletes the file DECODE.LIS;1 from the
      directory [000,000] on device DISK0 at remote node DALLAS. The
      user name and password follow the remote node name.

    9.$ DELETE NODE12::"DISK1:DEAL.BIG"
      $ DELETE NODE12::DISK1:DEAL.BIG;

      Either of these DELETE commands can be used to delete the file
      DEAL.BIG on device ZZZ1 at remote node NODE12. Note that the
      DELETE command requires an explicit version number in a file
      specification, but the file to be deleted is on a remote node
      whose file syntax does not recognize version numbers. (NODE12
      is an RT-11 node.) Therefore, the file specification must
      either be enclosed in quotation marks (" ")  or entered with
      a null version number (that is, a trailing semicolon [;]).

    10$ DELETE/GRAND_TOTAL *.txt;*
      %DELETE-I-TOTAL, 61 files deleted (274KB)

      The output display in this example shows that 61 files were
      deleted for a total of 274KB. The process is currently set to
      display file sizes in bytes. To change future displays to show
      blocks, use the SET PROCESS/UNITS=BLOCKS command.

    11$ DELETE/TREE $5$DKA100:[HOOPS...]*.*;*/LOG
      %DELETE-I-FILDEL, $5$DKA100:[HOOPS]SMG_HP.EXE;2 deleted (32 blocks)
      %DELETE-I-FILDEL, $5$DKA100:[HOOPS]TESTMSG.exe;4 deleted (32 blocks)
      %DELETE-I-FILDEL, $5$DKA100:[HOOPS.DTM.EXAMPLES]TERMTABLE.TXT;1 deleted (16 blocks)
      %DELETE-I-FILDEL, $5$DKA100:[HOOPS.DTM]EXAMPLES.DIR;1 deleted (16 blocks)
      %DELETE-I-FILDEL, $5$DKA100:[HOOPS]DTM.DIR;1 deleted (16 blocks)
      %DELETE-I-TOTAL, 5 files deleted (112 blocks)
      $

      The DELETE/TREE command deletes all the files and sub
      directories recursively excluding the parent directory.
Close Help