Reference > Script steps reference > Files script steps > Get File Exists
 

Get File Exists

Returns 1 (true) if a file exists; otherwise, returns 0 (false).

See also 

Options 

Source file is the path of the file to check. See Creating file paths.

Target is the field or variable to store the result. If the variable doesn’t exist, this script step creates it (see Using variables).

Compatibility 

 

Product 

Supported 

FileMaker Pro 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

No 

FileMaker Server 

Yes 

FileMaker Cloud products 

Yes 

FileMaker Data API 

No 

Custom Web Publishing 

Yes 

Originated in version 

18.0

Example 1 

Sets the Table::Data field to 1 if the file named data.txt exists.

Get File Exists [ "data.txt" ; Target: Table::Data ]

Example 2 

Displays whether a file named change.log exists in the Documents folder.

Set Variable [ $file ; Value: Get ( DocumentsPath ) & "change.log" ]
Get File Exists [ "$file" ; Target: $fileExists ]
Show Custom Dialog [ $file & ": " & If ( $fileExists ; "Exists" ; "Does not exist" ) ]

Related topics 

Script steps reference (alphabetical list)

Script steps reference (category list)