core

## Checking for a File's Existence

The Insert | File I/O Command | File Exists menu option inserts a command into the Edit window that checks for the existence of a file when executed and sets the supplied variable with the result.

The syntax of this command in the Edit window is:

<varname> = File/Exists,<filename>

Descriptions for some of the components of this command are:

<filename>
This is the name of the file being checked to see if it exists on disk.

<varname>
This is the name of the variable that is set to the result of the check that is performed. The variable is set to 1 if the file exists and 0 if the file does not exist.

To access the dialog box associated with this File I / O command:

1. Open the Edit window.

2. Place your cursor on the File Exists command.

3. Press F9.

More:

Sample Code for File Exists