User's Guide

CMSTATUS

Determine if a file or directory exists.

Function:

Determine if a file or directory exists. Set the variable specified in the STATUS parameter to "YES" or "NO" accordingly, depending if the file or directory exists or not.

Parameters:

INFILE
Input file or directory. Name of file or directory to check for the existence of.

STATUS
Status of the existence of the file or directory. Set the variable specified by the STATUS parameter to "YES" or "NO", depending upon if the file or directory exists or not, respectively.

Examples

  1. LAS> cmstatus infile="[las.images]alaska;img" status=status

    The file "[las.images]alaska;img" is checked for existence. If the file exists, the variable specified in STATUS is set to "YES." If the file does not exist, the variable specified in STATUS is set to "NO."

  2. LAS> cmstatus infile="[las.images]" status=status

    The directory "[las.images]" is checked for existence. If the directory exists, the variable specified in STATUS is set to "YES." If the directory does not exist, the variable specified in STATUS is set to "NO."

Description/Algorithm

A file or directory is checked to determine if it exists. If the file or directory does not exist, the parameter STATUS is set to "NO." If the file or directory does exist, the parameter STATUS is set to "YES."

Nonfatal error messages:

    None.

Fatal error messages:

    None.

User Notes:

  1. CMSTATUS looks for the specific name, therefore wildcards are not allowed. If the specified name is "sfimg.*", CMSTATUS will look for a file named "sfimg.*".

  2. The "YES"/"NO" status of the file or directory is returned in the TAE string variable defined by this parameter.