Results 1 to 3 of 3

Thread: script to identify "unused" tags

  1. #1

    Default script to identify "unused" tags

    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.

    Run time:

    • 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.

    Usage notes:

    • CAUTION: 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.
    Last edited by humanengr; 03-03-2013 at 07:49 PM. Reason: new script is attached to last post

  2. #2

    Default New script version

    v. 01 attached

    • Fixed mistaken classification as "unused" of empty parent tag with -multiple- used child tags.
    • Fixed case sensitivity -- unused tags with different case than a used tag are now classified as "unused".
    Last edited by humanengr; 03-23-2013 at 10:53 AM.

  3. #3


    v.03 attached

    • Added code for running w/o Growl.

    V. 02

    • Addressed a garbage collection issue. (Some unused tags were overlooked in older libraries.)
    Attached Files Attached Files
    Last edited by humanengr; 04-16-2013 at 02:44 AM. Reason: script update

Similar Threads

  1. Problems with "Copy tags to Spotlight comments"
    By pjtyrrell in forum EagleFiler
    Replies: 4
    Last Post: 03-21-2011, 09:55 AM
  2. Apple Script Question: "phantom" windows
    By commoner in forum EagleFiler
    Replies: 4
    Last Post: 01-22-2010, 10:02 PM
  3. Script to "hide" selected records
    By Steve Samuels in forum EagleFiler
    Replies: 3
    Last Post: 01-03-2010, 03:52 PM
  4. New script "Empty Junk Mail Folder" ?
    By RichardG in forum SpamSieve
    Replies: 2
    Last Post: 03-21-2008, 05:01 PM
  5. Script to move "Gray" messages to trash
    By tabaholic in forum SpamSieve
    Replies: 2
    Last Post: 03-19-2007, 11:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts