Path.ShortPath
--------------

Queries short file path on Windows.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Path](component_Path.md) | [9.0](newinversion90.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Path.ShortPath"; Path ) 

**MBS**( **"Path.ShortPath";** /\* Queries short file path on Windows. \*/  
**$Path**) /\* The native file path.e.g. "C:\\Users\\Christian Schmitz\\Dokumente" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native file path. | "C:\\Users\\Christian Schmitz\\Dokumente" |

### Result

Returns text or error.

### Description

Queries short file path on Windows.  
For your convenience this function returns same path on iOS, Mac and Linux.  
If the specified path is already in its short form and conversion is not needed, the function simply returns the input path.  
Use [Path.LongPath](PathLongPath.md) function to reverse to long path.  
### Examples

Convert FileMaker path:

 MBS ( "Path.ShortPath"; "C:\\Program Files\\FileMaker\\FileMaker Pro 17 Advanced" )  
<small>  
Example result: "C:\\PROGRA~1\\FILEMA~1\\FILEMA~1"</small>### See also

- [Path.LongPath](PathLongPath.md)

### Release notes

- **Version 9.0**
    - Added [Path.ShortPath](http://www.mbsplugins.eu/PathShortPath.shtml) and [Path.LongPath](http://www.mbsplugins.eu/PathLongPath.shtml) functions for Windows.

### Blog Entries

- [MBS Plugin Advent calendar: 7 - Paths](https://www.mbsplugins.de/archive/2023-12-07/MBS_Plugin_Advent_calendar_7_-/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.6pr4](https://www.mbsplugins.de/archive/2018-12-18/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 17th December 2018 , last changed 20th February 2024

  
[Path.RemoveLastPathComponent](PathRemoveLastPathComponent.md) - [Phidget.AddPositionOffset](PhidgetAddPositionOffset.md)

[HTML Version](PathShortPath.shtml)