User's Guide

CMEXIST

Check for the existence of a file or directory.

Function:

Check for the existence of a file or directory.

Parameters:

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

Examples

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

    The file "[las.images]alaska;img" is checked for existence. OPTION is set to LAS by default and correctly corresponds to the way INFILE is named.

  2. LAS> cmexist infile="[las.images]"

    The directory "[las.images]" is checked for existence.

Description/Algorithm

A file or directory is checked to determine if it exists. If the file or directory exists, CMEXIST returns a successful status. If the file or directory does not exist, an error message is displayed and CMEXIST returns a fail status.

Nonfatal error messages:

    None.

Fatal error messages:

  1. [cmexist-fatal] Fatal error encountered

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

  2. [cmexist-noexist] <xxxxx> does not exist

    The file or directory <xxxxx> does not exist.

User Notes:

    None.