FileExists()

Previous Next

This method verifies if a file exists.

If it exists, the "global.fileExists" variable is set to 'True'. If it does not exist, it is set to 'False'. "global.fileExists" is a system-defined global variable.

After you have executed the FileExists() method, you can use the global.fileExists variable to get the result. Refer to the value as follows:

:"global.fileExists"

Syntax

FileExists(<filepath>)

Parameters

filepath

Path specifying the location and name of the file you are looking for.

Example

Button action:

FileExists(:"Text Box 1")

ActionDecision(TEST_FILE_EXISTS)

Decision TEST_FILE_EXISTS:

Decision SQL: :"global.fileExists" = 'True'

Yes Action: MessageInformation('The file exists.')

No Action: MessageInformation('The file does NOT exist.')