The attached AppleScript will identify tags not assigned to any records. I find this handy to identify tags for deletion after moving records between libraries.
The usage notes (below) include a caution for those whose libraries contain mailboxes.
- 1:45 for an 838-record library on MacBook 2GHz.
- 3:50 for a 1783-record library.
I’ll add a brief note on this script to this sticky at the top of the forum posts.
<Nudge to script authors> Others who write (or have written) scripts or workflows – might want to similarly post a short note about it as a reply to the sticky there. That should help others find your helpful tidbits.
E-mail messages in mailboxes are not currently available via AppleScript. So the script will find, as ‘unused’, tags that are not used by files (including messages outside of mailboxes) but which -are- used by messages in mailboxes. If the library contains a mailbox (empty or not), the last “Growl” notification reminds you to check the unused tags for mail messages. - Unused tags do not include 1) built-in EF tags and 2) user-specified “permanent” tags. (User-specified permanent tags start with “!_”; other customizations are possible.)
- The script operates on -all- library records – i.e., record selection is ignored.
- Do not change or close front library until script completes. (You can switch to other applications.)
- Pre-10.8, adjust Growl test as indicated in the code.