Converts a path in a standard format to FileMaker format.
ConvertToFileMakerPath ( standardPath ; format )
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).
text
19.0
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 "?".
•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.
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.
ConvertToFileMakerPath ( "C:\Users\John Smith\Documents\test.xlsx" ; WinPath )
returns file:/C:/Users/John Smith/Documents/test.xlsx.
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 ) ]