FileDialogWatcher.GetLastPath
-----------------------------

Queries the last path used in open/save dialogs.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FileDialog](component_FileDialog.md) | [2.6](newinversion26.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "FileDialogWatcher.GetLastPath" ) ### Parameters

none

### Result

Returns text or error.

### Description

Queries the last path used in open/save dialogs.  
This returns native path like "/Users/cs/Desktop/test.jpg".  
Use [Path.NativePathToFileMakerPath](PathNativePathToFileMakerPath.md) to convert to a FileMaker path if you plan to use "filemac:" for an insert file script step.   
Does not work with FileMaker 8.5, 9 or 10. Works with FileMaker 11 and 12.  
  
Added support for Windows with version 10.4, but doesn't work for FileMaker's own dialogs.  
### See also

- [FileDialogWatcher.Install](FileDialogWatcherInstall.md)
- [Path.NativePathToFileMakerPath](PathNativePathToFileMakerPath.md)

### Release notes

- **Version 10.4**
    - Added [FileDialogWatcher.GetLastPath](https://www.mbsplugins.eu/FileDialogWatcherGetLastPath.shtml) and [FileDialogWatcher.Install](https://www.mbsplugins.eu/FileDialogWatcherInstall.shtml) for Windows in addition for macOS, but doesn't work as FileMaker uses older APIs.

### Example Databases

- [Files/FileDialogWatcher](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Files/FileDialogWatcher.shtml#6ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 10.4pr8](https://www.mbsplugins.de/archive/2020-09-04/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New cool things for Filemaker](https://www.mbsplugins.de/archive/2012-03-17/New_cool_things_for_Filemaker/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.6pr7](https://www.mbsplugins.de/archive/2012-03-16/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 9th November 2021

  
[FileDialog.SetWindowTitle](FileDialogSetWindowTitle.md) - [FileDialogWatcher.Install](FileDialogWatcherInstall.md)

[HTML Version](FileDialogWatcherGetLastPath.shtml)