User's Guide

CMDEL

Deletes directories or disk files.

Function:

Deletes directories or cataloged files.

Parameters:

Subcommand -DIR:
Deletes directories.

INDIR
Input name. The name of the directory to be deleted. The user may specify a catalog manager directory name (or list of names), also alias names may be specified.

CONFLG(YES)
Confirmation flag. Indicates whether the user will be prompted to confirm or deny the delete for each directory (or file).


  = YES:  Confirm the delete.  The user will be 
          prompted to confirm or deny the delete. 
  = NO :  Do not confirm the delete.  The user will
          not be prompted.  The delete will take 
          place without further interaction with the 
          user.

RECURSIVE(NO)
Gives the program permission to delete all files, links, and subdirectories in the directory as well as the directory specified.


  = YES: Delete the directory and all files, links,
         and subdirectories.
  = NO : Delete the directory only if it is empty.
Subcommand -FILE:
Deletes cataloged files.

INFILE
Input name. The name of the file to be deleted. The user may specify a file name, or list of names. To delete a single specific file name, the name and extension must be specified. To delete an image and its associated files, the image name with no extension should be specified. Optionally, a wildcard character (*) may be specified in the file name or extension.

CONFLG(YES)
Confirmation flag. Indicates whether the user will be prompted to confirm or deny the delete for each directory (or file).


  = YES:  Confirm the delete.  The user will be 
          prompted to confirm or deny the delete. 
  = NO :  Do not confirm the delete.  The user will
          not be prompted.  The delete will take 
          place without further interaction with the 
          user.

AFTYPE(*)
File type. List of associated files to be deleted.


  = *:           All associated files.  Delete all
		 associated files.
  = NONE:        No associated files.  Do not delete
		 any associated files.
  = extensions:  User-specified extensions.  Delete
		 only the associated files with the
		 specified extensions.

If a name specified in INFILE is an image name, the associated files deleted depend upon the combination of the IMAGEFLG and AFTYPE parameters. If an INFILE name is not an image name, the AFTYPE and IMAGEFLG parameters are ignored.

When IMAGEFLG is set to YES, the image and all associated files are deleted if AFTYPE is "*" (default). When IMAGEFLG is set to YES and AFTYPE is NONE, only the image, DDR and HISTORY files are deleted. To delete a specific list of associated files, their extensions should be specified in AFTYPE. The image, DDR, and HISTORY files may or may not be deleted, depending upon the value of IMAGEFLG.

IMAGEFLG(YES)
Image flag. This option allows a user to delete a list of associated files that excludes the image, DDR, and HISTORY. If INFILE is not an image name, AFTYPE and IMAGEFLG parameters are ignored.


  = YES: Delete image and associated files.  The
	 image and its DDR and HISTORY files are
	 deleted to the output name specification.
  = NO:  Delete only associated files.  The image,
	 DDR, and HISTORY files are not deleted
	 unless specified in the AFTYPE parameter.

Examples:

  1. LAS> cmdel-dir indir=[jones.test] conflg=yes

    The directory named [jones.test] will be deleted from disk if the user responds with "Y" at the confirmation prompt and the directory is empty.

  2. LAS> cmdel-dir indir=$workdir conflg=no

    The disk directory referred to by alias "$WORKDIR" will be deleted from disk, provided the directory is empty.

  3. LAS> cmdel-dir indir=[jones.test] conflg=no recursive=yes

    The directory named [jones.test] will be deleted from disk as well as all files,subdirectories, and links inside of [jones.test].

  4. LAS> cmdel-file infile=ny90

    The disk file NY90;IMG and all its associated files will be deleted. The user will be prompted to confirm or deny deletion for each file.

  5. LAS> cmdel-file infile=ny90 conflg=no aftype=none imageflg=yes

    Only the NY90 image file and the associated DDR and HISTORY files will be deleted. The user will not be prompted to confirm or deny deletion for each file.

  6. LAS> cmdel-file infile=ny90 conflg=no aftype=(gof.line) imageflg=yes

    The image, DDR, and HISTORY files will be deleted. In addition, only the disk files associated with the image NY90 that have the extensions specified in AFTYPE (NY90;GOF.LINE) will be deleted. The user will not be prompted to confirm or deny deletion for each file.

  7. LAS> cmdel-file infile=ny90 conflg=no aftype=(dltf,gof.line,misc) imageflg=no

    Only the disk files associated with the image NY90 whose extensions are specified in AFTYPE will be deleted. The image, DDR, and HISTORY files will not be deleted. The user will not be prompted to confirm or deny deletion for each file.

  8. LAS> cmdel-file infile=*;dltf conflg=no

    All files with extension DLTF will be deleted. The user will not be prompted to confirm or deny deletion for each file.

Description/Algorithm:

CMDEL deletes directories or cataloged files. With directories, CMDEL is able to remove an empty directory or a nonempty directory through RECURSIVE. If RECURSIVE, all files, subdirectories, and links inside of the directory will be removed. With files, CMDEL is able to delete .img, .ddr, and .his files, and/or any files associated with .img. It can also handle wildcards in the file names, and there is no limit to the number of files it can delete.

Nonfatal Error Messages:

  1. [cmdel-name] Specification error

    Invalid Parameter Specification

    This error occurs most often because people do not have the directory or filename in LAS format. Some other reasons are:

        For directories:
        o  Directory must be specified in LAS format.
        o  A file name must not be specified when deleting a directory.
    
        For files:
        o  Wildcards are allowed only in the file name and extension.
    

  2. [cmdel-nodir] No directories (or files) deleted

    Upon completion, this message is displayed if no directories (or files) are deleted. The specific reason will have been previously displayed.

  3. [recurdel-nohost] Error trying to retrieve host name

    This message is displayed if CMDEL cannot get the host name.

Fatal Error Message:

  1. [cmdel-fatal] Fatal error encountered

    The error message that is displayed immediately preceding this message is the specific error that was encountered. Processing is terminated.

  2. [cmdel-notexist] The directory <XXXXX> does NOT exist

    The is message is display when a user specified directory does not exist.

User Notes:

  1. If RECURSIVE is left to the default, CMDEL-DIR will only delete empty directories.

  2. If an INFILE specification of the subcommand -FILE is not an image name, AFTYPE and IMAGEFLG are ignored. If AFTYPE is the default (*), all files associated with the image are deleted. In order to delete only the image, DDR, and HISTORY files, AFTYPE must be NONE; otherwise, additional associated files may be specified in AFTYPE.