c-c-c-c Posted February 7, 2023 Share Posted February 7, 2023 Hi There, Is there a way to get expose the value of `kMDItemDisplayName` in a workflow? I have a file filter from which I'm trying to extract the value of `kMDItemDisplayName` so I can output a markdown link on the pasteboard. It's exposed in the title field of the results, but there doesn't seem to be a programmatic way to access it? I looked through the Automation Tasks and couldn't find anything. Also looked through the documentation under dynamic placeholders (would be great if file metadata could be exposed this way). I can't use `{query} ` as it returns a path and the filename is a uuid. Thanks Link to comment
Stephen_C Posted February 8, 2023 Share Posted February 8, 2023 Does the Automation Task Get Path Basename Without Extension not do what you want? Stephen Link to comment
c-c-c-c Posted February 8, 2023 Author Share Posted February 8, 2023 no, the filename is a uuid, and didn’t see an automation task that returns a metadata field Link to comment
c-c-c-c Posted February 8, 2023 Author Share Posted February 8, 2023 Figured this out using mdls: mdls -raw -name kMDItemDisplayName $itempath # where item path is an alfred variable that outputs a path from a file filter I'm using it in a workflow related to Devonthink to act on recent documents added to my database: Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now