Reference > Functions reference > Miscellaneous functions > ConvertToFileMakerPath
 

ConvertToFileMakerPath

Converts a path in a standard format to FileMaker format.

Format 

ConvertToFileMakerPath ( standardPath ; format )

Parameters 

standardPath - any text expression or text field containing a path in a standard format.

format - a named value that specifies the standard format that standardPath is in (see below).

Data type returned 

text

Originated in version 

19.0

Description 

This function performs the reverse operation of ConvertFromFileMakerPath. The format parameter can have the same values as in the ConvertFromFileMakerPath function.

When a standard path can’t be converted to a FileMaker path, this function returns "?".

Notes 

If standardPath is not in the format specified by the format parameter, this function may return an invalid FileMaker path or "?".

This function converts URL paths that use the fmp scheme to FileMaker paths with the fmnet prefix. All other returned FileMaker paths use the file prefix. See About path prefixes.

Example 1 

ConvertToFileMakerPath ( "/Users/John Smith/Documents/test.xlsx" ; PosixPath ) returns:

file:/Macintosh HD/Users/John Smith/Documents/test.xlsx on a Mac where the root volume is named Macintosh HD.

file:/C:/Users/John Smith/Documents/test.xlsx on a Windows computer where the boot drive is C.

Example 2 

ConvertToFileMakerPath ( "C:\Users\John Smith\Documents\test.xlsx" ; WinPath ) returns file:/C:/Users/John Smith/Documents/test.xlsx.

Example 3 

Displays fmnet:/fmhost.example.com/My Clients.fmp12 after converting the URL in the $URL variable to a FileMaker path.

Set Variable [ $URL ; Value: "fmp://fmhost.example.com/My%20Clients.fmp12" ]
Show Custom Dialog [ ConvertToFileMakerPath ( $URL ; URLPath ) ]

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Creating file paths