Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Converts a FileMaker path useful for "filemac:" and "filewin:" path specification to a native path.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Path | 2.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
path | The FileMaker file path. | "/Macintosh HD/Users/test/Desktop/picture.jpg" | |
PassThroughNativePath | Available in MBS FileMaker Plugin 11.0 or newer. Whether to pass through a native path directly and avoid conversion, if the path is valid already. Default is 1 to enable this. |
1 | Optional |
Returns the native path.
Convert path to native path:
MBS( "Path.FilemakerPathToNativePath"; "/Macintosh HD/Users/test/Desktop/picture.jpg")
Convert path with path list:
MBS( "Path.FileMakerPathToNativePath";
"file:test/picture.jpg¶" &
"fileLinux:/test/picture.jpg¶" &
"fileMac:/Macintosh HD/Users/test/Desktop/picture.jpg¶" &
"fileWin:D:\test\picture.jpg" )
// pick the right path from a list of paths.
Batch convert list of paths:
# test kopie20 in file Contacts
Set Variable [ $FMPaths ; Value: "/Mac/Users/test/Desktop/picture1.jpg" & ¶ &
"/Mac/Users/test/Desktop/picture2.jpg" & ¶ &
"/Mac/Users/test/Desktop/picture3.jpg" & ¶ &
"/Mac/Users/test/Desktop/picture4.jpg" & ¶ &
"/Mac/Users/test/Desktop/picture5.jpg" & ¶ &
"/Mac/Users/test/Desktop/picture6.jpg"]
Set Variable [ $NativePaths ; Value: While (
[ list = ""; i = 1; c = ValueCount ( $FMPaths ) ] ;
i ≤ c ;
[ path = GetValue($FMPaths; i); npath = MBS( "Path.FileMakerPathToNativePath"; path ); list = list & npath & ¶; i = i + 1 ] ; list ) ]
Show Custom Dialog [ "Native Paths" ; $NativePaths ]
Created 18th August 2014, last changed 21st June 2021
Path.AddPathComponent - Path.FilePathToFileURL
Feedback: Report problem or ask question.