At a high level, metadata is simply "data about data." Relative to Name Mangler, metadata is the data that's recorded with certain files—audio, video, and images in particular—that provides additional information about that file.
For example, here's the metadata for a photo taken with a Nikon DSLR. (This is simply the file's File ➝ Get Info dialog in Finder, with the More Info section revealed.)
All of the entries in the More Info section are metadata; as you can see, there's a lot of extra information there. But that's just the metadata for an image file; macOS can track lots of metadata values for various types of files. The good news is that you can use any of this metadata in your Name Mangler renaming actions.
It should go without saying, but in order to use metadata in a renaming operation, the file(s) in question must have metadata. Use the Finder's Get Info dialog to check on what data is available for your renaming operation—there may be additional fields not shown in Get Info, however.
There are some metadata fields available in all renaming operations; see Tips and Tricks for details on these exceptions.
See the metadata items section for a comprehensive list of every metadata item you can use in Name Mangler.
macOS vs Other Metadata
It's very important to note that Name Mangler does not read raw metadata directly from photos, videos, and audio files.
That is, EXIF and BWF metadata and the like are not what Name Mangler uses for its metadata source. Instead, Name Mangler uses macOS's metadata, which is imported into macOS from those source files. Not everything is imported, though, because source metadata often has fields that macOS doesn't know about.
You can use Terminal to check what metadata macOS has stored for a particular file. Launch Terminal (found in Applications > Utilities), type mdls, press the Space Bar, drag and drop the file of interest from Finder into Terminal, then press Return. The output will look something like this:
Each of the kMDItem... entries is a piece of metadata, and you can use it in your renaming actions. You can find references to each and every kMDItem... entry further down in this section, in case you wonder what a certain value may represent.
To find those references even quicker, use ⌘F to search here in help. Enter one of the "kMD..." terms and press Return. You can also use the drop-down menu at the top of the page to jump to any metadata item by its more-usable common name.s
Accessing Metadata
Metadata can be used in numerous places in Name Mangler—just look for the plus sign at the end of an input field, as seen here in the Insert command's text box:
Anywhere you see this plus sign, you can click it to reveal Name Mangler's metadata browser. From this metadata browser, you can easily work with all available metadata fields.
Keyboard fanatics, you can activate the browser by pressing ⌘+, as long as you've first used the Tab key to select a field in which metadata is allowed.
In addition, you can use metadata in Advanced Mode by simply typing an open angle bracket and typing; see the Advanced Mode help for more information on how this works.
The Metadata Browser
When you click the plus sign in an eligible input field, the metadata browser will appear:
There are lots—as in hundreds—of metadata items. And while you can drill down into the categories using the mouse (or keyboard), the quickest way to use the browser is to do as it says, and start typing. As you type, the browser will automatically shorten the list based on matches for what you've typed.
As you can see, you don't have to type letters from the beginning of words; the browser pattern matches against every letter in every each word in the metadata terms list. (You must type at least two letters to start searching, due to the sheer number of matches found on just one character.)
Here, with just four characters, the browser has singled out Phone Numbers as the desired field. Once you see your desired metadata term, click on it with the mouse, or highlight it with the arrow keys, then press Enter. When you do that, you'll see the metadata field in the input box, in a colored box:
Here's an example showing how to add images' resolutions to their filenames. Using the Add Suffix command, choose the Width and Height metadata items, and format them as you'd like:
With the command set up as desired, the file info area will show a preview of the image files' new names:
As you can see, the height and width have been appended, in a nicely formatted and easy to read manner. That's really all there is to using metadata: find the fields you want to use, format them with surrounding text as you desire, and then add them to your filenames. There are, however, some tips and tricks to getting the most out of metadata; keep reading to learn about those.
Tips and Tricks
Mingle metadata and text
A simple tip, but useful for formatting filenames: you can intermix text and metadata fields in a renaming operation, like this:
Obviously, you'll want to be careful about creating monstrously-long filenames, but a few well-placed characters can greatly enhance readability.
Always-available metadata fields
As noted earlier, in order to use metadata, the files you're renaming must have metadata. There are, however, a few exceptions to that rule. When you activate the metadata browser, notice that the first Names entry is outside the METADATA section. Select it to see a number of filename-related values that can be used with every file:
There are also three entries at the bottom of the list that can be used with any file: Total Number of Items, Current Date, and Random Characters. These do exactly what you would expect—though two of them have additional configuration options (see below).
In addition, there are some scattered always-available metadata entries in other sections. For instance, every file will have creation and modification timestamps, a file size, and a path; you'll find all of these items in the File section.
(All of the metadata fields are described in the metadata items section of this help page.)
Metadata with additional options
After adding metadata to an input box, you'll typically just see a simple 'pill,' as with the Phone Numbers field below left. But others—Height, Width, and Current Date, to name a few—look a bit different, by way of a small downward-facing arrow:
Click that downward-facing arrow to reveal a drop-down menu containing formatting options for the selected metadata field. If you've chosen a date/time or numeric metadata field, you'll see one of these two self-explanatory menus:
If you select the Random Characters metadata field, you get a different menu:
Use the Eligible Characters section of the menu to limit the types of characters in your random string, and the Number of Characters section to control the length of the resulting string.
Metadata Glossary
The following glossary is arranged in the category-field order shown in the metadata browser.
Name
In Name Mangler
MDItem Name
Description
Name
--
The file's current filename, as it would appear if all prior-listed renaming actions had occurred.
Extension
--
The file's current extension (if present), as it would appear if all prior-listed renaming actions had occurred.
.Extension
--
The file's current extension (if present), as it would appear if all prior-listed renaming actions had occurred, and including the actual dot character.
Name.Extension
--
The file's full current filename, including the extension (if present), as it would appear if all prior-listed renaming actions had occurred.
Original Name
--
The file's original filename, unaffected by any listed renaming actions.
Original Extension
--
The file's original extension (if present), unaffected by any listed renaming actions.
Original .Extension
--
The file's original filename and extension (if present), unaffected by any listed renaming actions including the actual dot character.
Original Name.Extension
kMDItemFSName
The file's full original filename, including the extension (if present), unaffected by any listed renaming actions.
Original Display Name
kMDItemDisplayName
The file's original filename as displayed by the Finder, possibly localized.
Common Prefix
--
The common portion of file's original names, excluding extensions. For example, the common prefix of IMG_9125.JPG and IMG_2512.JPG is IMG.
Name of Parent Folder
--
The name of the folder containing the file, for each file in the file info area.
File
In Name Mangler
MDItem Name
Description
File Creation Date
kMDItemFSCreationDate
The date the file was created.
File Modification Date
kMDItemFSContentChangeDate
The date the file was last modified.
Content Creation Date
kMDItemContentCreationDate
The date that the contents of the file were created. This can be different than the date the file was created.
Content Modification Date
kMDItemContentModificationDate
The date that the contents of the file were modified. This can be different than the date the file was modified.
Metadata Modification Date
kMDItemAttributeChangeDate
The date of the last change made to a metadata attribute.
Last Used Date
kMDItemLastUsedDate
The date that the file was last used, i.e. the last time it was opened.
Path
kMDItemPath
The complete path to the file.
URL
kMDItemURL
The URL of the file.
Bundle Identifier
kMDItemCFBundleIdentifier
If the file is a bundle (an application, for example), this field contains its bundle identifier.
Content Type
kMDItemContentType
The Uniform Type Identifier of the file. A JPEG image, for instance, will have a Content Type of public.jpeg.jpg.
Size
kMDItemFSSize
The size of the file, in bytes.
Number of Files
kMDItemFSNodeCount
The number of files in a folder. For plain files, the result is "-".
Number of Files in Parent Folder
kMDItemFSNodeCount [in parent folder]
The number of files in the folder containing the file or folder.
Tags
kMDItemUserTags
Any tags associated with the file in Finder. Note that this metadata field is only available if you're running Mavericks. Multiple tags are separated with a " + " construct.
Label
kMDItemFSLabel
The index value for the label assigned to the file in the Finder. Possible values are 0 (no label) to 7 (gray, in the default label scheme).
Finder Comment
kMDItemFinderComment
The file's Finder comments.
Generic Comment
kMDItemComment
A comment related to the file. This differs from the Spotlight comment.
Info
kMDItemInformation
Information about the file. This isn't related to the Finder's Info dialog, and the value is most likely empty.
Owner
kMDItemFSOwnerUserID
The numeric ID of the owner of the file.
Group
kMDItemFSOwnerGroupID
The numeric ID of the group associated with the file.
Custom Icon
kMDItemFSHasCustomIcon
A boolean value indicating if the file has a custom icon (value=1) or not (value=0).
Extension Hidden
kMDItemFSIsExtensionHidden
A boolean value indicating if the file's extension is hidden (value=1) or visible (value=0).
Invisible
kMDItemFSInvisible
A boolean value indicating if the file is hidden (value=1) or visible (value=0).
Stationery
kMDItemFSIsStationery
A boolean value indicating if the file is an macOS Stationery file (value=1) or not (value=0).
Image
In Name Mangler
MDItem Name
Description
Width
kMDItemPixelWidth
The width, in pixels, of the contents of the file.
Height
kMDItemPixelHeight
The height, in pixels, of the contents of the file.
Number of Pixels
kMDItemPixelCount
The number of pixels in the contents of the file.
Color Space
kMDItemColorSpace
The color space used by the contents of the file. For example, 'RBG,' 'CMYK,' etc.
Color Profile
kMDItemProfileName
The name of the color profile used by the contents of the file. For example, 'sRGB Profile.'
Bits per Sample
kMDItemBitsPerSample
The number of bits per sample of the contents of the file. For image files, the bit depth of the image. (For audio files, use Audio > Sample Rate.)
Layer Names
kMDItemLayerNames
The names of the layers in file.
Alpha Channel
kMDItemHasAlphaChannel
A boolean value indicating if the file has an alpha channel (value=1) or not (value=0).
Aperture
kMDItemAperture
The aperture setting used to acquire the file's contents. This unit is the APEX value.
Exposure Mode
kMDItemExposureMode
The exposure mode used to acquire the file's contents. Possible values are 0 (auto exposure), 1 (manual exposure) and 2 (auto bracket).
Exposure Program
kMDItemExposureProgram
The class of the exposure program used by the camera to set exposure when the file's contents were created. Possible values include Manual, Normal, and Aperture priority.
Exposure Time
kMDItemExposureTimeString
The time of the exposure.
Exposure Time in Seconds
kMDItemExposureTimeSeconds
The exposure time, in seconds, used to acquire the file's contents.
Exposure Time Denominator
--
The denominator of the exposure time, i.e. 250 if the exposure time was 1⁄250th of a second.
Flash On/Off
kMDItemFlashOnOff
A boolean value indicating if a flash was used (value=1) or not used (value=0) when capturing the file's contents.
F-Number
kMDItemFNumber
The F-number (F-stop) used to capture the contents of the file.
Focal Length
kMDItemFocalLength
The focal length of the lens, in millimeters, used to capture the file's contents.
ISO Speed
kMDItemISOSpeed
The ISO speed used to capture the file's contents.
Maximum Aperture
kMDItemMaxAperture
The smallest F-number of the lens used to capture the file's contents.
Metering Mode
kMDItemMeteringMode
The metering mode used to capture the file's contents. Possible values are Unknown, Average, CenterWeightedAverage, Spot, MultiSpot, Pattern, and Partial.
Orientation
kMDItemOrientation
A boolean value indicating the orientation of the file's contents, either portrait (value=1) or landscape (value=0).
Red Eye Reduction
kMDItemRedEyeOnOff
A boolean value indicating if red eye reduction mode was used (value=1) or not used (value=0) to create the file's contents.
Resolution Width
kMDItemResolutionWidthDPI
The resolution width, in DPI, of the file's contents.
Resolution Height
kMDItemResolutionHeightDPI
The resolution height, in DPI, of the file's contents.
White Balance
kMDItemWhiteBalance
A boolean value indicating if the contents of the file were acquired with manual white balance (value=1) or auto white balance (value=0).
Timestamp
kMDItemTimestamp
The timestamp on the file's contents. Generally this will be used to indicate the time at which the event captured by the file's contents took place.
Speed
kMDItemSpeed
The speed of the item, in kilometers per hour.
Object Direction
kMDItemGPSTrack
The direction of travel of the item, in degrees from true north.
Image Direction
kMDItemImageDirection
The direction of the item's image, in degrees from true north.
Make
kMDItemAcquisitionMake
The manufacturer of the device used to acquire the file's contents.
Model
kMDItemAcquisitionModel
The model of the device used to acquire the document's contents.
Lens
kMDItemLensModel
The model of the lens used to acquire the document's contents.
EXIF Version
kMDItemEXIFVersion
The version of the EXIF header used to generate the file's metadata.
EXIF GPS Version
kMDItemEXIFGPSVersion
The version of GPSInfoID in EXIF used to generate the file's metadata.
Audio
In Name Mangler
MDItem Name
Description
Duration
kMDItemDurationSeconds
The duration, in seconds, of the contents of the file. (Also listed under Video.)
Title
kMDItemTitle
The title of the file. This could be the name of the song, the document's title, or the subject of an email message.
Track Number
kMDItemAudioTrackNumber
The track number of the song in the file, when it's part of an album.
Album
kMDItemAlbum
The title for a collection of media, as in a record album or photo album.
Artist
kMDItemAuthors
The performer of the contents of the file.
Composer
kMDItemComposer
The composer of the contents of the file.
Lyricist
kMDItemLyricist
The lyricist of the contents of the file.
Musical Genre
kMDItemMusicalGenre
The musical genre of the contents of the file.
Key
kMDItemKeySignature
The key of the contents of the file. For example, C, Dm, F#m, Bb, etc.
Tempo
kMDItemTempo
A value that specifies the beats per minute of the music contained in the file.
Time Signature
kMDItemTimeSignature
A value that specifies the time signature of the music contained in the file. For example, 4/4 or 7/8.
Instrument
kMDItemMusicalInstrumentName
The name of the instrument that's been associated with the contents of the file.
Instrument Category
kMDItemMusicalInstrumentCategory
The name of the instrument category that's been associated with the contents of the file.
Recording Date
kMDItemRecordingDate
The recording date of the contents of the file.
Recording Year
kMDItemRecordingYear
The four-digit year in which the contents of the file were recorded.
Audio Bit Rate
kMDItemAudioBitRate
The audio bit rate of the contents of the file. (Also listed under Video.)
Number of Channels
kMDItemAudioChannelCount
The number of channels in the audio data contained in the file. Apple helpfully adds: "This integer value only represents the number of discreet channels of audio data found in the file. It does not indicate any configuration of the data in regards to a user's speaker setup."
Sample Rate
kMDItemAudioSampleRate
The sample rate of the audio data contained in the file. The returned value represents the rate in hertz, i.e. 44100.0.
Is General MIDI Sequence
kMDItemIsGeneralMIDISequence
A boolean that indicates whether the MIDI sequence contained in the file is set up for use with a General MIDI device (value=1) or not (value=0).
Encoding Application
kMDItemAudioEncodingApplication
The name of the application that encoded the data contained in the file.
Loop Info
kMDItemAppleLoopDescriptors
Specifies multiple pieces of descriptive information about a loop. In addition to genre and instrument, files can contain descriptive information that help users in refining searches.
Loop Filter Type
kMDItemAppleLoopsKeyFilterType
Specifies key filtering information about a loop file. Loops can be tagged with one of the following key filters: AnyKey, Minor, Major, NeitherKey, or BothKeys.
Loop Mode
kMDItemAppleLoopsLoopMode
Specifies how the file should be played. Tagged files can either be loops or non-loops. "Looping" indicates the file should be treated as a loop; "Non-looping" indicates the file should not be treated as a loop.
Loop Key
kMDItemAppleLoopsRootKey
Specifies the loop file's original key. The key is the root note or tonic for the loop, and does not include the scale type.
Video
In Name Mangler
MDItem Name
Description
Duration
kMDItemDurationSeconds
The duration, in seconds, of the contents of the file. (Also listed under Audio.)
Performers
kMDItemPerformers
Lists performers in the contents of the file.
Director
kMDItemDirector
Lists the director of the contents of the file.
Producer
kMDItemProducer
Lists the producer of the contents of the file.
Genre
kMDItemGenre
Lists the genre of the contents of the file.
Media Types
kMDItemMediaTypes
Lists the media types present in the contents of the file.
Codecs
kMDItemCodecs
Lists the codecs used to encode/decode the contents of the file.
Audio Bit Rate
kMDItemAudioBitRate
The audio bit rate of the contents of the file. (Also listed under Audio.)
Video Bit Rate
kMDItemVideoBitRate
The video bit rate of the video in the contents of the file.
Total Bit Rate
kMDItemTotalBitRate
The total bit rate (audio and video combined) of the contents of the file.
Delivery Type
kMDItemDeliveryType
The delivery type (either 'Fast start' or 'RTSP') of the contents of the file.
Streamable
kMDItemStreamable
A boolean value indicating if the contents of the file are streamable (value=1) or not (value=0).
Original Format
kMDItemOriginalFormat
The original format of the video contents of the file.
Original Source
kMDItemOriginalSource
The original source of the video contents of the file.
Location
In Name Mangler
MDItem Name
Description
Latitude
kMDItemLatitude
The latitude of the contents of the file, in degrees north of the equator, expressed using the WGS84 datum. Negative values lie south of the equator.
Longitude
kMDItemLongitude
The longitude of the contents of the file, in degrees east of the prime meridian, expressed using the WGS84 datum. Negative values lie west of the prime meridian.
Altitude
kMDItemAltitude
The altitude of the contents of the file in meters above sea level, expressed using the WGS84 datum. Negative values lie below sea level.
Location
kMDItemNamedLocation
The name of the location or point of interest associated with the contents of the file. The name may be user provided.
City
kMDItemCity
Identifies city of origin of the contents of the file, according to guidelines established by the provider.
State/Province
kMDItemStateOrProvince
Identifies the state or province of origin of the contents of the file, according to guidelines established by the provider.
Country
kMDItemCountry
The full, publishable name of the country or primary location where the intellectual property of the contents of the file was created, according to guidelines of the provider.
Other
In Name Mangler
MDItem Name
Description
Audiences
kMDItemAudiences
The audience for which the file is intended. The audience may be determined by the creator or the publisher or by a third party
Contributors
kMDItemContributors
The audience for which the file is intended. The audience may be determined by the creator or the publisher or by a third party
Contacts
kMDItemContactKeywords
A list of contacts that are associated with the contents of the file, not including the authors.
Participants
kMDItemParticipants
The list of people who are visible in an image or movie or written about in a file.
Projects
kMDItemProjects
The list of projects that this file is associated with.
Publishers
kMDItemPublishers
The entity responsible for making the resource in the file available.
Recipients
kMDItemRecipients
Recipients of the contents of the file.
Subject
kMDItemSubject
Subject of the contents of the file.
Theme
kMDItemTheme
Theme of the contents of the file.
Phone Numbers
kMDItemPhoneNumbers
Phone numbers related to the contents of the file.
Instant Message Addresses
kMDItemInstantMessageAddresses
Instant message addresses related to the contents of the file.
Email Addresses
kMDItemEmailAddresses
EMail addresses related to the contents of the file.
Author Addresses
kMDItemAuthorAddresses
The addresses of the authors of the contents of the file.
Author Email Addresses
kMDItemAuthorEmailAddresses
The email addresses of the authors of the contents of the file.
Recipient Addresses
kMDItemRecipientAddresses
The addresses of the authors of the contents of the file.
Recipient Email Addresses
kMDItemRecipientEmailAddresses
The email addresses of the authors of the contents of the file.
Copyright
kMDItemCopyright
The copyright owner of the contents of the file.
Coverage
kMDItemCoverage
The extent or scope of the content of the resource. Coverage will typically include spatial location (a place name or geographic co-ordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity).
Creator Application
kMDItemCreator
Application used to create the content of the file.
Description
kMDItemDescription
A description of the content of the file. The description may include an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content.
Due Date
kMDItemDueDate
Date the content of the file is due.
Encoding Applications
kMDItemEncodingApplications
Application used to convert the original content into it's current form. For example, a PDF file might have an encoding application set to "Distiller."
Fonts
kMDItemFonts
Fonts used in the contents of the file.
Headline
kMDItemHeadline
A publishable entry providing a synopsis of the contents of the file.
Identifier
kMDItemIdentifier
An identifier used to reference the resource within a given context. For example, an email application could use this to store a message identifier.
Instructions
kMDItemInstructions
Editorial instructions concerning the use of the contents of the file, such as embargoes and warnings.
Keywords
kMDItemKeywords
Keywords associated with the file.
Kind
kMDItemKind
A description of the kind of item this file represents.
Languages
kMDItemLanguages
Indicates the languages of the intellectual content of the file.
Number of Pages
kMDItemNumberOfPages
Indicates the number of pages in the content of the file.
Organizations
kMDItemOrganizations
The company or organization that created the file.
Page Width
kMDItemPageWidth
Width of the document page, in points (72 points per inch). For PDF files this indicates the width of the first page only.
Page Height
kMDItemPageHeight
Height of the document page, in points (72 points per inch). For PDF files this indicates the width of the first page only.
Rating
kMDItemStarRating
User rating of this item. For example, the stars rating of an iTunes track. (As of iTunes 10, however, this value isn't set for iTunes tracks.)
Rights
kMDItemRights
Information related to the usage rights of the contents of the file.
Security
kMDItemSecurityMethod
The security or encryption method used for the file.
Source
kMDItemWhereFroms
Describes where the file was obtained from. For example, a downloaded file may refer to the URL, files received by email may indicate the sender’s email address, message subject, etc.
Text Content
kMDItemTextContent
Contains a text representation of the content of the file.
Version
kMDItemVersion
The version number of the file.
Miscellany
In Name Mangler
MDItem Name
Description
Total Number of Items
--
Is anyone actually reading this? If so, let us know and win a prize!
Current Date
--
Inserts the current date and/or, with a user-specifiable format.
Random Characters
--
Inserts a user-specified assortment of random characters (text and/or numbers).
The data for the above massive reference table is from Apple's own site, where it can be found in the ever-thrilling MDItem Reference documentation.
So why is this one link hiding out here in a massively-large space, with nothing else around it? Basically, it's some white space to help insure that the Metadata entry in the Quick Access section can properly highlight the entries at the bottom of the table.