andy4222 Posted April 14 Share Posted April 14 Is there a way to find all the available tags in the file system? If not, would be good to surface them via automation tasks. Right now, if we add a new tag, we have to add the tag in the finder and also in Alfred. Link to comment
vitor Posted April 15 Share Posted April 15 Apple does not provide an API to retrieve your custom tags, so if you want that to be supported, use the Feedback Assistant app to ask them to provide such a method. The more people do it, the likelier it is to be implemented. Previous conversation. andy4222 1 Link to comment
zeitlings Posted April 15 Share Posted April 15 Perhaps there is an option... You could recursively traverse the entire file system and collect all the tags that way 😄 Link to comment
zeitlings Posted April 17 Share Posted April 17 Not an automation task and I'm not sure how you would use it in the, I assume, Label Color Tag workflow, but you could get the tags like this: mdfind -onlyin ~/Documents "kMDItemUserTags=*" | xargs -I{} mdls -name kMDItemUserTags {} | sed -e 's/kMDItemUserTags = (//; s/)//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e '/^$/d' | tr -d ',"' | sort | uniq Depending on how many tagged files you have on your system, this may take a while. To search the entire filesystem, you can replace ~/Documents with just ~, which could take quite a long while. To have a continuous stream of (unfiltered) tags, you can try this in the terminal to make sure that it works: mdfind -onlyin ~ "kMDItemUserTags=*" | xargs -I{} mdls -name kMDItemUserTags {} | sed -e 's/kMDItemUserTags = (//; s/)//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e '/^$/d' -e 's/\"//g' -e 's/\,//' Press ctrl+C to stop the process. 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