Skip to main content

Reveal File (script step reference)

Troi File Plug-in for FileMaker Pro

Reveal File

Reveals a file in the Finder or Windows Explorer.

SyntaxScript step badge

Reveal File [ Select ; Result (error) ; FilePath ]


Select entire contents replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field
Result (error) an error code
FilePath the path to the file to be revealed

Returned Result

Data type returned

Error code


The returned result is an error code. An error always starts with 2 dollars, followed by the error code. You should always check for errors. Returned error codes can be:

0 no error The file was revealed in the Finder or Explorer
$$-35 nsVolErr No such volume (Wrong disk name or not mounted)
$$-43 fnfErr File not found
$$-50 paramErr Parameter error

Other errors may be returned.

Originated in

Troi File Plug-in 9.0


FileMaker Pro 16 to FileMaker Pro 2023


You can use FileMaker styled paths, like “filewin:/C:/MyFiles/test.txt”.


Reveal File [ Select ; $ErrorCode ; "C:\readme.doc" ]

This will make the file visible in a Windows Explorer window and select it.

Example 2

We assume that in your FileMaker file the following fields are defined:

  gErrorCode		Global, number
  gFilePath		Global, text

gFilePath should contain the path to the file, for example “D:\Logs\L01.TXT” (Windows) or “Mac HD:Logs:Log 1” (Mac). In a script add the following script step:

Reveal File [ Select ; gErrorCode ;  gFilePath ]

This will show the file specified by gFilePath in the Finder or Explorer. It will open the enclosing folder and show the file selected.

Related script stepsScript step badge

Launch Application
Launch File
Open Folder
Reveal Folder

Related functionFunction badge


Related topics

Troi File Plug-in online help (overview)

Online Help Page for Troi File Plug-in for 16 to 2023 –> Reveal File (filep7299) 2023-0601 16:30:19