Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  


Launches the file.

Component: Files
Version: 2.7
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: No

MBS( "Files.Launch"; AppPath { ; DocPath } )


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.


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.

See also Files.LaunchFile if you need to open a document.

Version 5.3 supports passing several DocPath parameters.

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"; "C:\Users\Christian\Desktop\test2.txt")

Launch iMessages app:

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

Launch Mail application:

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

See also

Files.ItemExists   -   Files.LaunchFile

Feedback: Report problem or ask question.

MBS REAL studio tutorial videos - Nachhilfe in Wassenach