Skip to main content

FileExists

Use this function to determine whether the specified file exists in the specified directory. A return value of 1 means the file exists in the specified directory; a value of 0 means it does not.

Note: If you create a variable to store the return value for this function, you must create the variable with the NUM type.

Syntax:

FileExists("FileName")

where:

  • FileName is the name of the file, including the extension, to search for. In batch mode, the file name must be relative to the current directory. For Longview Smart Client, the file name must be relative to the working directory. You can also specify a full path to search in an alternate directory.

Syntax example:

SymbolSpec = FileExists("Reports.xlsx")

If FileExists("Reports.xlsx")

Was this article helpful?

We're sorry to hear that.