Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4   9.5    Statistic  


Removes last path component.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Path 6.0 Yes Yes Yes Yes Yes
MBS( "Path.RemoveLastPathComponent"; Path )   More


Parameter Description Example value
Path The native file path. "/Users/cs/Desktop"


Returns path or error.


Removes last path component.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.


Removes last path component on Windows:

MBS( "Path.RemoveLastPathComponent"; "c:\\test.txt" )

Get app folder path:

MBS( "Path.RemoveLastPathComponent"; MBS( "App.GetProcessPath" ))

Query plugin folder:

MBS( "Path.RemoveLastPathComponent"; MBS( "Plugin.Path" ) )

Example result: "/Applications/FileMaker Pro 18 Advanced/Extensions"

See also

Example Databases

Blog Entries

Release notes

Created 30th November 2015, last changed 28th August 2019

Path.NativePathToFileMakerPath   -   Path.ShortPath

Feedback: Report problem or ask question.

MBS Xojo Plugins