Files.CreateBookmark
--------------------

Creates a bookmark from a file path.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Files](component_Files.md) | [3.1](newinversion31.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "Files.CreateBookmark"; Path { ; RelativePath; PreferFileIDResolution; MinimalBookmark } ) 

**MBS**( **"Files.CreateBookmark";** /\* Creates a bookmark from a file path. \*/  
**$Path**; /\* The native path to file or folder where the bookmark refers to. \*/   
**$RelativePath**; /\* Optional; Optional the path of a file/folder being the relative path. This can be the native path to your database. This way you can later find the file again if database and target file moved together.e.g. "/Data/ImageFiles" \*/   
**$PreferFileIDResolution**; /\* Optional; Optional, whether you prefer FileID resolution later over path resolution. Can be 1 or 0. Default is 0.e.g. 1 \*/   
**$MinimalBookmark**) /\* Optional; Optional, whether to request a minimal bookmark.  
Creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Path | The native path to file or folder where the bookmark refers to. | $path |  |
| RelativePath | Optional the path of a file/folder being the relative path. This can be the native path to your database. This way you can later find the file again if database and target file moved together. | "/Data/ImageFiles" | Optional |
| PreferFileIDResolution | Optional, whether you prefer FileID resolution later over path resolution. Can be 1 or 0. Default is 0. | 1 | Optional |
| MinimalBookmark | Optional, whether to request a minimal bookmark.   Creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways. | 1 | Optional |

### Result

Returns bookmark data text or error message.

### Description

Creates a bookmark from a file path.  
This is like an alias file in Finder, but as text, so you can store it in a text field in your database.  
### See also

- [Files.ResolveBookmark](FilesResolveBookmark.md)

### Release notes

- **Version 9.0**
    - Added MinimalBookmark parameter to [Files.CreateBookmark](http://www.mbsplugins.eu/FilesCreateBookmark.shtml) function.

### Example Databases

- [Files/Alias and NodeID](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Files/Alias%20and%20NodeID.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 8.6pr3](https://www.mbsplugins.de/archive/2018-12-12/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 3.1 for OS X/Windows - More than 1400 Functions In One Plugin](https://www.mbsplugins.de/archive/2013-02-12/MBS_FileMaker_Plugin_31_for_OS/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 28th November 2019

  
[Files.CreateAlias](FilesCreateAlias.md) - [Files.CreateDirectory](FilesCreateDirectory.md)

[HTML Version](FilesCreateBookmark.shtml)