Home Search

DriveWorks Pro 22
FsFileExists

Send Feedback

FsFileExists

Returns TRUE if the specified file location exists. FALSE is returned if it does not. An error string is returned if there are any problems checking for existence.

This function could affect performance (when the file being checked is located on an unreachable network for instance).

Therefore the Rules Builder or Analyze Rule function in Test Mode will not display the result of the function, a blank will be displayed instead.

Syntax

FsFileExists([File Location],[Wait Time])

Where:

File Location is the file location to check. If a full path is not specified the function will check for the location relative to where the Project is stored.

Wait Time is the minimum amount of time to wait for the check to complete in seconds. After the specified time if the file was not found the function will return the message "#IO! Timed out" (This property is optional).

Note: Do not use to wait for a file to be generated. The Wait Time is the time to wait for the check to complete and not intended to pause the start of the check.

Examples

RuleResultMeaning
FsFileExists("C:\DriveWorks\DataSheets\Product.pdf")TRUEWill check to see if the file exists in the given location.
FsFileExists("C:\DriveWorks\Specifications\"&OrderNumberReturn&"\Quote.doc")TRUEWill check to see if the file exists. This example shows how you would find a file for a specific Specification.