Reference > Script steps reference > Files script steps > Open File
 

Open File

Opens the specified FileMaker file or allows the user to select a file to open.

See also 

Options 

Open hidden opens or hides the specified database.

Add FileMaker Data Source specifies a FileMaker Pro Advanced database to open.

Add ODBC Data Source specifies an ODBC data source to open.

Manage Data Sources allows you to modify or remove external data sources you have added. See Editing FileMaker data sources and Editing ODBC data sources.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

No 

FileMaker Server 

No 

FileMaker Cloud 

No 

FileMaker Data API 

No 

Custom Web Publishing 

No 

Runtime solution 

Partial 

Originated in 

FileMaker Pro 6.0 or earlier

Description 

For ODBC data sources, this script step reestablishes a link to the ODBC data source.

Script steps after Open File perform in the FileMaker file that contains the script, not the file opened by the script.

If you don't specify a file, FileMaker Pro Advanced displays the Open File dialog box when the Open File script step performs so that the user can specify a file. The Open File dialog box will also be displayed if the file used in the script has been moved, deleted, or renamed.

Notes 

If new database creation has been disabled in your installation of FileMaker Pro Advanced, it will not be possible to convert file types such as Microsoft Excel or tab delimited files into FileMaker Pro Advanced databases. However, you can still import the data from other file types into FileMaker Pro Advanced (if you open the database with a password that allows you to import). If you need more information, contact your system administrator.

In runtime solutions, the Open File script step returns an error if an external file is not bound to the solution.

This script step is unable to open a file from an unauthorized file.

If the specified file is opened and then hidden by FileMaker Pro Advanced, scripts that are set to run upon opening are still run.

Example 1 

Exports records from the current database, opens the Invoices Backup database, and runs the Import Invoices script from the Invoices Backup database.

Export Records [With dialog: On ; Create directories: Off]
Open File [Open hidden: Off ; "Invoices Backup"]
Perform Script [Specified: From list ; "Import Invoices" from file: "Invoices Backup" ; Parameters: ]

Related topics 

Convert File

Script steps reference (alphabetical list)

Script steps reference (category list)

Working with external data sources