Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Queries properties for a file.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
MetaDataQuery | 8.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |
Parameter | Description | Example |
---|---|---|
Path | The native file path to the file to check. | "/Users/cs/Desktop/sample.pdf" |
Returns JSON or error.
Query download URL of file:
Set Variable [ $path ; Value: "/Users/cs/Downloads/test.html" ]
Set Variable [ $json ; Value: MBS( "MetaDataQuery.AttributesForFile"; $path) ]
Set Variable [ $link ; Value: MBS("JSON.GetPathItem"; $json; "kMDItemWhereFroms¶0") ]
Show Custom Dialog [ "Link" ; $link ]
Query song details:
MBS( "MetaDataQuery.AttributesForFile"; "/Users/cs/Music/iTunes/iTunes Music/ABBA/ABBA_ Gold - Greatest Hits/16 One of Us.m4p" )
Check image file:
MBS("MetaDataQuery.AttributesForFile"; "/Users/cs/Pictures/IMG_5199.jpeg")
Example result:
{
"kMDItemLogicalSize" : 4320752,
"kMDItemFocalLength" : 24,
"kMDItemPhysicalSize" : 4321280,
"kMDItemMeteringMode" : 5,
"kMDItemInterestingDate_Ranking" : "2023-10-19 00:00:00 +0000",
"kMDItemFlashOnOff" : false,
"kMDItemAcquisitionMake" : "Canon",
"kMDItemFSFinderFlags" : 0,
"kMDItemFSTypeCode" : 0,
"kMDItemAcquisitionModel" : "Canon EOS 760D",
"kMDItemProfileName" : "Apple Wide Color Sharing Profile",
"kMDItemFSLabel" : 0,
"kMDItemExposureProgram" : 3,
"kMDItemFSCreatorCode" : 0,
"kMDItemISOSpeed" : 800,
"kMDItemFSSize" : 4320752,
"kMDItemEXIFVersion" : "2.3",
"kMDItemFSOwnerUserID" : 501,
"kMDItemBitsPerSample" : 24,
"_kMDItemDisplayNameWithExtensions" : "IMG_5199.jpeg",
"kMDItemLastUsedDate_Ranking" : "2023-10-19 00:00:00 +0000",
"kMDItemHasAlphaChannel" : false,
"kMDItemFSName" : "IMG_5199.jpeg",
"kMDItemUsedDates" : [
"2023-10-18 22:00:00 +0000"
],
"kMDItemContentCreationDate" : "2019-04-28 13:57:29 +0000",
"kMDItemKind" : "JPEG-Bild",
"kMDItemFSContentChangeDate" : "2023-03-20 16:37:18 +0000",
"kMDItemExposureMode" : 0,
"kMDItemColorSpace" : "RGB",
"kMDItemContentCreationDate_Ranking" : "2019-04-28 00:00:00 +0000",
"kMDItemOrientation" : 0,
"kMDItemContentModificationDate" : "2019-04-28 13:57:29 +0000",
"kMDItemAperture" : 6,
"kMDItemFNumber" : 8,
"kMDItemFSInvisible" : false,
"kMDItemLensModel" : "Canon EF-S 18-135mm f\/3.5-5.6 IS STM",
"kMDItemResolutionWidthDPI" : 72,
"kMDItemDisplayName" : "IMG_5199.jpeg",
"kMDItemResolutionHeightDPI" : 72,
"kMDItemUseCount" : 3,
"kMDItemContentType" : "public.jpeg",
"kMDItemFSOwnerGroupID" : 20,
"kMDItemWhiteBalance" : 0,
"kMDItemLastUsedDate" : "2023-10-19 08:04:21 +0000",
"kMDItemPixelWidth" : 6000,
"kMDItemPixelHeight" : 4000,
"kMDItemFSCreationDate" : "2023-03-20 16:37:15 +0000",
"kMDItemExposureTimeSeconds" : 0.033333333333333333,
"kMDItemFSIsExtensionHidden" : false,
"kMDItemDateAdded" : "2023-03-20 16:37:23 +0000",
"kMDItemPixelCount" : 24000000,
"kMDItemDocumentIdentifier" : 1079121,
"kMDItemAuthors" : [
"Monika Schmitz"
],
"kMDItemRedEyeOnOff" : false,
"kMDItemContentTypeTree" : [
"public.jpeg",
"public.image",
"public.data",
"public.item",
"public.content"
],
"kMDItemPath" : "\/System\/Volumes\/Data\/Users\/cs\/Pictures\/IMG_5199.jpeg",
"kMDItemContentRating" : 0
}
This function checks for a license.
Created 21st December 2017, last changed 19th October 2023
MessageComposer.disableUserAttachments - MetaDataQuery.Close