Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4    Statistic  


Launches the file.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Files 2.7 Yes Yes Yes No No
MBS( "Files.Launch"; AppPath { ; DocPath; NewInstance } )   More


Parameter Description Example value
AppPath Native path to the application to launch. "/Applications/"
DocPath Optional
Optional, Native path to the document to pass as argument.
Must be text to distingush from flag, which are numbers.
NewInstance Optional
Available in MBS FileMaker Plugin 7.2 or newer.
Whether to launch new app instance on Mac.
Default is 0.


Returns "OK" or error.


Launches the file.
The OS will lookup what application is associated with the file type and launch the application asking it to open the document.
You can use this function to open a database file with FileMaker or your runtime solution. Query with Files.AppPath the path to your application. Than call Launch with that application path and your database file path.

Please use Files.LaunchFile to open a file and Files.Launch to open a file in a specific application.

Version 5.3 supports passing several DocPath parameters.
With version 7.2 the last parameter can be a number with 0 or 1 to define whether to run a new app instance.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.


Launch two text files in Textedit:

MBS( "Files.Launch"; "/Applications/"; "/Users/cs/Desktop/filme.rtf"; "/Users/cs/Desktop/test.rtf" )

Run notepad on Windows with a text file:

MBS( "Files.Launch"; "notepad.exe"; "C:\Users\Christian\Desktop\test2.txt")

Launch iMessages app:

MBS( "Files.Launch"; "/Applications/")

Launch Mail application:

MBS( "Files.Launch"; "/Applications/")

Restart FileMaker with same database:

Set Variable [$dbpath; Value:Get ( FilePath )]
Set Variable [$dbpath; Value:MBS( "Path.FileMakerPathToNativePath"; $dbpath )]
Set Variable [$apppath; Value:MBS( "App.GetProcessPath" )]
Set Variable [$r; Value:MBS( "Files.Launch"; $apppath; $dbpath; 1 )]
Exit Application

Open Website in Firefox on Windows:

MBS( "Files.Launch"; "C:\Program Files\Mozilla Firefox\Firefox.exe"; "" )

Open website in Google Chrome on Windows:

MBS( "Files.Launch"; "C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe"; "" )

Launch System Events app:

MBS( "Files.Launch"; "/System/Library/CoreServices/System" )

See also

Example Databases

Blog Entries

Release notes

Created 18th August 2014, last changed 31st May 2020

Files.ItemExists   -   Files.LaunchFile

Feedback: Report problem or ask question.

MBS FileMaker tutorial videos