Conditional Processing

$ife filename [filesize]


The syntax of this command has changed in CopiaFacts 8.2.  In earlier releases, only $ife existed, and was processed as $ifxe is now processed.

This "if exists" command is used to condition the processing of file commands on the existence of a file. It operates in the same way on file statements as for the $if command. Conditional commands may be nested to a depth of thirty-two levels.

The parameters on this command are used as follows:

filenamethe full pathname to be tested. For $ifxe, and $ifnxe, if the filename part is all numeric, any leading zeros are expanded or truncated so that a number with fewer than 8 significant digits acquires an 8-digit filename. This allows testing of filenames which were entered by a caller without leading zeros.
It is recommended that you use a fully-qualified pathname for the file, so that the test does not depend on the current directory setting.
filesize the minimum file size to be considered. If the file is smaller than this size, it will be treated as if it did not exist. This allows testing of voice message files which may be small if the caller quickly canceled the recording.

There is also a function DoesFileExist in the application support DLL


Test that a voice file is present and longer than 100 bytes:

$ife @myvar.VOX 100

  $next_box 123


  $next_box 124