Converts a path in FileMaker format to a standard format.
ConvertFromFileMakerPath ( filemakerPath ; format )
filemakerPath
- any text expression or text field containing a path in FileMaker format.
format
- a named value that specifies the standard format in which to return the path (see below).
text
19.0
FileMaker clients and hosts internally use paths in the formats shown in Creating file paths to specify external files or FileMaker data sources. Before you can use these FileMaker paths to work with external systems, you need to convert a FileMaker path to a standard format that the external system supports.
Use the format
parameter to specify one of the following standard path formats.
| For paths used by | Standard format |
---|---|---|
| POSIX (Unix-like) operating systems—for example, macOS, iOS, iPadOS, and Linux | /directory/filename |
| Web-based systems—for example, Rest APIs and the Insert From URL script step | file:///directory/filename, if path is for a local file fmp://host.domain/directory/filename, if a FileMaker Network path, which starts with fmnet:/ |
| Windows operating systems | drive:\directory\filename, where drive is the drive letter |
The FileMaker path of a hosted FileMaker Pro file can only be converted to a URL path that uses the fmp scheme. When a FileMaker path can’t be converted to the specified format, this function returns "?".
•FileMaker paths that use path prefixes beginning with file
, image
, or movie
and ending with win
, mac
, or linux
are converted in the same way as the file
prefix. See About path prefixes.
For | Returns for |
---|---|
file:/Machintosh HD/etc/hosts Full path to a local file on the root volume of a POSIX system | URLPath: file:///etc/hosts PosixPath: /etc/hosts WinPath: ? |
file:/Clients/contacts.txt Full path to a local file on a non-root volume of a POSIX system | URLPath: file:///Volumes/Clients/contacts.txt PosixPath: /Volumes/Clients/contacts.txt WinPath: ? |
file:/C:/Users/John Smith/Documents/test.xlsx Full path to a local file in Windows | URLPath: file:///C:/Users/John%20Smith/Documents/test.xlsx PosixPath: ? WinPath: C:\Users\John Smith\Documents\test.xlsx |
file://computerName/Documents/test.xlsx Full path to a file on a remote Windows computer | URLPath: file://computerName/Documents/test.xlsx PosixPath: ? WinPath: \\computerName\Documents\test.xlsx |
fmnet:/fmhost.example.com/My Clients.fmp12 Full path to a hosted FileMaker Pro file | URLPath: fmp://fmhost.example.com/My%20Clients.fmp12 PosixPath: ? WinPath: ? |
file:dir1/dir2/file.fmp12 A path relative to the current FileMaker Pro file | URLPath: ? PosixPath: dir1/dir2/file.fmp12 WinPath: dir1\dir2\file.fmp12 |
ConvertFromFileMakerPath ( "file:Import/Sales.xlsx" ; PosixPath )
returns Import/Sales.xlsx.
For a Table::Filename field that contains "contacts.txt," returns file:///Users/UserName/Documents/contacts.txt (the path of this file in the current user’s Documents folder in URL format).
ConvertFromFileMakerPath (
"file:" & Get ( DocumentsPath ) & Table::Filename ;
URLPath
)