TrFile_GetFileMakerPathFromFullPath |
Returns the FileMaker styled full path (converted from a native path)
Syntax
TrFile_GetFileMakerPathFromFullPath( switches ; filepath )
Parameters
| switches | not used, reserved for future use. Leave blank or put "-Unused" |
| filePath | the (native) path to the file or folder |
Returned Result
Data type returned
Text
Result
The returned result is a FileMaker styled full path (starting with a slash).
Originated in
Troi File Plug-in 17.1
Compatibility
FileMaker Pro 18 to FileMaker Pro 22 (2025)
Considerations
The filePath is always converted, even if the file does not exist.
On macOS this function also converts any paths of files and folders located on volumes that are mounted on a custom mount point. For example the file: “SMBDiskName:store1:img.jpg” might be internally located at:
“/MyDisk/Users/abe/custom_mountpoints/store1/img.jpg”.
The returned FileMaker styled path can be used with the Set Field[ ] step to set a container field, for example with a JPEG image.
See also the DragAndDrop.fmp12 example file, where this is implemented.
Example
On Windows:
Set Variable [ $FileMakerStylePath ;
TrFile_GetFileMakerPathFromFullPath( "-Unused" ; "Z:store1img.jpg" ) ]
The returned result is a FileMaker styled full path (with forward slashes):
/Z:/store1/img.jpg
On macOS:
Set Variable [ $FileMakerStylePath ;
TrFile_GetFileMakerPathFromFullPath( "-Unused" ; "ExternDisk:folder:img.jpg" ) ]
The returned result is a FileMaker styled full path (with forward slashes), for example:
/ExternDisk/folder/img.jpg
Example 2
In this (macOS) example assume you have a disk named SMBDisk, which is mounted at “/Users/abe/custom_mountpoints”.
In this case you might use the the function like this:
Set Variable [ $FileMakerStylePath ;
TrFile_GetFileMakerPathFromFullPath( "-Unused" ; "SMBDisk:store1:img.jpg" ) ]
Set Variable [ $PrefixedFileMakerStylePath ;
If( Abs(Get(SystemPlatform)) = 1 ; "imagemac:" ; "imagewin:") & $FileMakerStylePath ]
Set Field[ myContainer ; $PrefixedFileMakerStylePath]
The variable $FileMakerStylePath will contain a FileMaker styled full path (with forward slashes), for example:
/Users/abe/custom_mountpoints/store1/img.jpg
The returned path is converted to account for the custom mount point.
Used in example file
DragAndDrop.fmp12
Related functions
| TrFile_DragAndDrop |
| TrFile_GetFullPathFromFileID |
| TrFile_Search |
| TrFile_SelectFileDialog |
Related topics
Troi File Plug-in online help (overview)