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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Queries the last path component.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Path | 6.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
Path | The native file path. | "/Users/cs/Desktop" |
Returns path or error.
Queries file name:
MBS( "Path.LastPathComponent"; "c:\\test.txt" )
Get file name from container and add to folder path:
Set Variable [$name; Value:GetAsText ( Container Batch Export::Test1 )]
Set Variable [$name; Value:GetValue($name; 1)]
Set Variable [$name; Value:MBS( "Path.LastPathComponent"; $name )]
Set Variable [$dpath; Value:MBS( "Path.AddPathComponent"; $FolderPath; $name )]
Write container to temp file and launch:
# get temp folder
Set Variable [$TempFolder; Value:MBS( "Folders.SystemTemporary" )]
# and file name from container
Set Variable [$name; Value:MBS( "Path.LastPathComponent"; test::myContainer )]
# add name to folder path
Set Variable [$TempPath; Value:MBS( "Path.AddPathComponent"; $TempFolder; $name )]
# now write temp file
Set Variable [$r; Value:MBS( "Files.WriteFile"; test::myContainer; $TempPath)]
# and launch file
Set Variable [$r; Value:MBS( "Files.LaunchFile"; $TempPath)]
This function checks for a license.
Created 30th November 2015, last changed 18th March 2016