You can use the \(\text{FileExists}\) function to determine if a file exists.

You can use the \fileexists backslash command to insert this function.

The following variants of this function are available:

  • \(\text{boolean } \text{FileExists} \left ( \text{<filename>} \right )\)

The \(\text{<filename>}\) parameter is a text string encoded as a tuple holding the name of the function to test against. The function returns true if the file exists or false if the file does not exist.

Figure 133 shows an example use of the \(\text{FileExists}\) function.