Create RULE to delete all tags with length = 36 - HowTo?

Hi,
I’m trying to get rid of a bunch (> 150K) of tags that have been auto-created upon addition through following RSS posts.

Trying to follow this interestingly similar post by fellow denizens of these forums :wink:

I found that the added tags are all 36 characters long. (pasted a couple in gsheet and applied formula =LEN(cell address))
Hence I thought the easiest way was to remove all tags with length = 36.

I then set out to create a rule to try to achieve this.
I’ve tried a couple of different settings at “Perform the following actions:”

  • On Demand
  • On Startup
    However nothing seems to happen, so my question is “What am i doing wrong?”

Then the next step / issue:
I have my DB’s synced over a couple of macs.
To start with I have disabled sync for this particular DB.
Am I correct in following reasoning:

  • first fix rule to get rid of excessive tags
  • apply rule to delete tags
  • then, on syncstore, delete the related DB (and later do the same on all macs syncing this DB)
  • once tag issue is solved, re-enable sync, uploading from the curated DB
  • on other macs, re-enable sync and download from syncstore

Thanks for helping out!

P.S.
FYI: What also happened previously is that all these 36 char tags were synced as "Finder"tags…
This resulted in bringing my 2013 Mac Pro with 12 core cpu and 64 GB of ram to its knee’s…
I had to manually remove all thes thousands and thousands of tags.
Then I applied the hidden preference to disable Devonthink sync of tags to “Finder tags”

Picture-115

Here is a small teaching edition script that will remove tags of 36 characters from the current database…

tell application id "DNtp"
	set currentDB to current database -- Process only the current database
	set allTags to (every parent of currentDB whose (tag type is ordinary tag)) -- Get only ordinary tags
	
	repeat with thisTag in allTags -- Loop through the list of tags
		if (count (name of thisTag as string)) = 36 then -- Check the length and only process those that match
			move record thisTag to trash group of currentDB -- Put the tag group into the database's Trash
		end if
	end repeat
end tell

You will still need to empty the database’s Trash afterwards.

Thanks a ton Jim! Will report back,
When manually deleting I need to empty the Trash too so that’s the same…

Oops! Apparently this post was not posted yet… So, late to the show, but this has worked a ton! Thx!

Now find a way to add this to com.devon-technologies.think3?
And then sync it to other mac’s.

Glad it worked for you.

Now find a way to add this to com.devon-technologies.think3?

I’m not sure what you mean here.