Here's two commands that lets you copy tags from one file to another.
xattr -wx com.apple.metadata:_kMDItemUserTags \
"$(xattr -px com.apple.metadata:_kMDItemUserTags /path/to/original)" /path/to/copy
xattr -wx com.apple.FinderInfo \
"$(xattr -px com.apple.FinderInfo /path/to/original)" /path/to/copy
You can iterate through various files to copy the tags to multiple destinations. For applying the above to various files based on the results of a find command (which lets you automatically iterate through results of various searches), see my answer here:
Here is a small bash script using the previously mentioned commands. You can use it, for example, in Automator.
#!/bin/bash
# copy Tags from 1 file folder to the next
TAGS_FROM="$1"
TAGS_TO="$2"
if [[ -e "$TAGS_FROM" ]] && [[ -e "$TAGS_TO" ]]; then
xattr -wx com.apple.metadata:_kMDItemUserTags "$(xattr -px com.apple.metadata:_kMDItemUserTags "$TAGS_FROM")" "$TAGS_TO"
xattr -wx com.apple.FinderInfo "$(xattr -px com.apple.FinderInfo "$TAGS_FROM")" "$TAGS_TO"
else
echo "Unexpected input, usage:"
echo "$(basename "$0") /path/to/original /path/to/copy"
exit 1
fi
Here is an example of an automator/apple-script (still using the bash commandline...). First set some attributes for this automator.app, then drag a file onto the app. The file will then copy the attributes from the automator.app to itself. I am no Applescripter, so improvement is always welcome.
You can delete custom tags you created by going to "Finder-->Preferences-->Tags" Then highlight the tags you don't want. (To select multiple at once click one and then shift+click the last one). Right-click and "Delete # Tags".
In your case, with 70+ tags, just use select all from the edit menu (Command A) to select all the tags. Then hold the option key to click the 6 tags you want to keep. Once the rest are selected you can mass delete them, leaving the few tags you prefer.
Best Answer
You can use Homebrew's tag:
You can combine this with a find command to find specific files/folders + recursive.