Local and hosted file access

The available filemaker operations do not change with the connection method. Only the --file target changes. Use a filesystem path when the file is closed, or an fmnet:// URL when FileMaker Pro or FileMaker Server already has the file open.

File state --file target
Closed local file Absolute or relative path to the .fmp12 file
Open in FileMaker Pro fmnet://<host>/<FileName> after enabling FileMaker Network sharing
Hosted by FileMaker Server fmnet://<server>/<FileName>

Closed local file

Use the file's path when FileMaker Pro does not have it open:

Copy
filemaker --file="/Users/example/Documents/Contacts.fmp12" [options] ops.ndjson

Relative paths resolve from the current directory. A path beginning with ~ is refused rather than expanded, so use an absolute path when a script may run from different directories.

Do not use the direct path while the file is open in FileMaker Pro. Connect to the open file through FileMaker Network sharing instead.

File open in FileMaker Pro

An open file must be shared before filemaker can connect to it:

  1. In FileMaker Pro, open the file.

  2. Choose File > Sharing > Share with FileMaker Clients.

  3. Set Network Sharing to On.

  4. Select the file and allow network access for the accounts or privilege sets that should connect.

Then use the FileMaker Pro host and the file's hosted name:

Copy
filemaker --file="fmnet://localhost/Contacts" [options] ops.ndjson

Replace localhost when FileMaker Pro is running on another computer. The account must be allowed to access the file through FileMaker Network sharing.

Warning  Peer-to-peer sharing is for testing FileMaker Pro peer-to-peer connections are not encrypted and support only a small number of clients. Claris recommends FileMaker Server or FileMaker Cloud for encrypted connections and production hosting. See Peer-to-peer sharing.

File hosted by FileMaker Server

A server-hosted file is already open and available through FileMaker Network sharing. Address it with the server's DNS name or IP address and the hosted file name:

Copy
filemaker --file="fmnet://fm.example.com/Contacts" [options] ops.ndjson

The server must be reachable from the machine running filemaker, and the FileMaker account must have access to the hosted file.

The connection method does not change operations

Local paths and fmnet:// targets expose the same filemaker operation catalogs and use the same NDJSON input and output. Choose the target from where the file is currently open, then use the rest of this reference the same way.