Files.GetTagNames
-----------------

Queries names of the tags assigned to the file/folder.

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

MBS( "Files.GetTagNames"; Path ) 

**MBS**( **"Files.GetTagNames";** /\* Queries names of the tags assigned to the file/folder. \*/  
**$Path**) /\* The native path to the file.e.g. "/Users/cs/Desktop/test.txt" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native path to the file. | "/Users/cs/Desktop/test.txt" |

### Result

Returns list or error.

### Description

Queries names of the tags assigned to the file/folder.  
Requires macOS 10.9.  
This function needs a native path. Please use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) function in order to convert a FileMaker style path to a native path.  
Please note that some tags may include chr(10) followed by a number to indicate which label color is used for compatibility to older OS X versions. Those appear escaped as \\n in the result.  
You can use [Files.GetFinderLabel](FilesGetFinderLabel.md) to read label number.  
### Examples

Queries tag names:

 Set Variable \[$r ; Value:MBS ( "Files.GetTagNames"; "/Users/cs/Desktop/todo.rtf")\]  
### See also

- [Files.GetFinderLabel](FilesGetFinderLabel.md)
- [Files.SetTagNames](FilesSetTagNames.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Blog Entries

- [MBS FileMaker Plugin 3.5 for OS X/Windows - More than 2100 Functions In One Plugin](https://www.mbsplugins.de/archive/2013-12-17/MBS_FileMaker_Plugin_35_for_OS/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 3.5pr2](https://www.mbsplugins.de/archive/2013-10-22/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2020, Seite 34](https://filemaker-magazin.de/neuigkeit/4103-Appetithappen-FMM_202004)

This function checks for a license.

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

  
[Files.GetPosixPermissions](FilesGetPosixPermissions.md) - [Files.IdentifyData](FilesIdentifyData.md)

[HTML Version](FilesGetTagNames.shtml)