file_exists (x)

The file_exists(x) function returns True if file x exists; False otherwise. x must be a fully qualified file name.

If the file part of x contains ? or * wildcards, the file_exists(x) function returns True if there is at least one file in the directory that matches the wildcard pattern. If any component in the path does not exist or is inaccessible, the function returns False.

This function returns a value of type Boolean.

Example

 file_exists ("c:\mydir\fake.doc")

Result: True if the file fake.doc exists in the directory c:\mydir.