Quick way to delete 'empty' imported Evernote notes

I should add - my premium just recently canceled and it was the first time in many years I’m without that version of Evernote. It’s a wild feeling but I have to say there’s no looking back with DT. I love it.

3 Likes

moved over from EN in october and fully agree - DT is playing in a different, better, league…

6 Likes

I normally select View->“Show only Documents” to hide the obsolete Evernote groups. Furthermore I almost always sort by “Date Created” (as I used to do in Evernote). This way the imported (empty) notes are usable enough, as they serve as archive only.

1 Like

I just noticed this thread–going to take a look at this script as I still have a TON of Evernote crap to get through.

I’ve used two approaches so far:

  1. Smart search to find all PDF documents in a former Evernote notebook, and then just dragged them all to a new location in my database. Then deleted all the remaining Evernote groups. This was targeting a place that I knew only had PDFs.

  2. In groups where there were more than just PDFs, I have started working through them and cleaning out a lot of garbage I don’t need after 10+ years of dumping things into Evernote.

My EN subscription doesn’t end until August, but I’ve cleaned everything out–only keeping it active in case I’ve forgotten about an automated flow that needs to be redirected to DEVONthink

3 Likes

As a newbie, how does one “run” this script in DEVONthink?

Thanks.

1 Like

You can’t run this script directly, it can only be used in a Smart Rule.

  • Download @BLUEFROG’s original Smart Rule from here

  • In Finder’s downloads folder:

    • Double click to unzip it
    • Double click the Smart Rule to install it
  • In DEVONthink:

    • Find the Smart Rule in the Navigation Sidebar
    • Contextual menu > Edit
    • Set the search scope
    • Click “Edit script”
      • Remove the original script
      • Paste the modified script from here

Using a Smart Rule

There are several ways to actually run a Smart Rule. From help:

There are two commands in the Tools menu related to smart rules:

  • Tools > Apply Rules: This runs the actions of a chosen rule on selected items, but only ones matched by the smart rule.

  • Tools > Perform Rules: This performs the chosen rule as defined, not acting on the selection.

In case of this specific Smart Rule you could simply use the Smart Rule’s contextual menu to run it.

As mentioned in Bluefrog’s post it’s a good idea to first test the result with duplicates.

3 Likes

To add to the excellent guidance from @pete31.

If you right-click on the new Smart Rule (which can be found at the bottom of the Navigation sidebar) and click Edit… then up pops a window that looks a bit like the Smart Groups found in Apple Photos or Music. Where it says “Search In”, change the folder to be the one with Evernote files that you want to ‘clean’. (I personally chose Evernote folders with only a dozen or so items until I got confident in the process – I also duplicated a few folders as test cases, as @BLUEFROG and @pete31 suggested.) Click OK to save.

Then left-click on the Smart Rule again in the Navigation sidebar, and main Devonthink window will show all the superfluous Evernote files. Check these look ok. Each will generally just be a small stub file with nothing but a single hyperlink to a PDF or similar. Occasionally you may find more content in this, in which case you should go back into your Evernote folder and manually clean that up if required.

Once you’re comfortable with what’s shown in the Smart Rule window, select Tools > Apply Rules. For each small stub file, the rule will move the linked PDF (or other file) up to the root of your Evernote folder, delete the small stub file, and then remove the empty folder.

4 Likes

Thanks for the detailed explanation Pete!

1 Like

@jeep, I’m unclear on the first step. I do not see a “Search In” when I right-click on the “Clean Evernote Imports” Smart Rule. This is what I see:

In that popup window, click on Edit… to open Smart Rule edit window which has the ‘Search In’ parameter

That’s what I thought, got it. I’ve got 60 Evernote folders :slight_smile:

Good luck, and thank you again to everyone on this thread but especially @BLUEFROG and @pete31 for their kind support.

FWIW I have found DT3 a superb replacement in all ways and am hesitatingly starting to migrate some Hazel scripts into DT3 as well. However… I still prefer the results from the Evernote web clipper. It creates a neater simplified note for many types of pages. So I now manually archive my Evernote web clips monthly into DT3 and using this rule where necessary. (I also adapted a few AppleScripts I found along the journey to export to Apple Notes for sharing with my wife, but that’s another story.)

@jeep I’m quite interested in how you “archive” Evernotes monthly to DT.

It sound like a 1-way sync of EN → DT, but you do you get only the most-recent-this-month notes out of Evernote?

Thanks.

I’m just using Evernote as a temporary holding point – I delete the notes from Evernote once they’re imported into DT. (You could move them somewhere else into Evernote, but the whole idea for me is to strip Evernote down to nothing except a conduit for certain content e.g. web clippings.)

Got it, thanks.

Thank you all, from asking the question to providing useful answers.

For all those newbies that still struggle like me: it took me several hours to understand what happens and I will give some (hopefully useful) comments. However, a few things are still unclear. I hope the below triggers the experts and explains a few things for the beginners like me.

  • Pete31 explains it. If you follow his links then you first find a zip with the rule, and then the Applescript in the command above, which will need to be inserted into the rule.
  • The rule provided by @BLUEFROG contains a filter, choosing only documents with one outgoing link. Hence, it targets the text note (“Formatted Text” kind). Not sure whether this could be executed on the folder? That would simplify use (see point below)
  • As written by @pete31, you still need to set to right scope of the rule, because even if you trigger it on the right file it wouldn’t be executed if not in scope. For me that was the Evernote folder within the Inbox.
  • if you want to trigger it on a larger set you need to expand all folders (I only found the way of selecting all the folders and then pressing the right arrow key)
  • the two options of running the rules were confusing. But I understand it that applying the rule means it runs only for the selection. Performing the rule will deal with the full scope (as set by the rule definition see point above). So, try to apply it first a few times, then perform the rule if you chose as well the Evernote imported folder.
  • If you apply the rule on a test then it can very confusing as you suddenly only see the formatted note and no longer the PDF. That is because the PDF moved out and the formatted text note moved. If you look carefully then the view context did change! It can be now the trash or something related to a Tag. @BLUEFROG does that need fixing? Or can the tags be ignored?

You don’t have to use the tags if you don’t want. DEVONthink will import Evernote tags applied to the files you import.

Sorry, I guess I misformulated. I do want the tags. They are still valid. But I can still find the formatted note under tags, although the note itself went into the trash can. Is that as expected?


See here. The Formatted Note still “lives” under tags. That looks wrong.

No it’s not wrong.
Read Help > Getting Started > Tagging, especially the Ordinary Tags section.

Thanks again! I found this (couldn’t find the section you mentioned):

Basically, it says: it’s a feature, not a bug. But I don’t see the use of keeping the replicant under the Tags section. Hence, two questions arise:

  • Why would I want to keep this replicant under Tags? Is there something I don’t know?
  • Could you do more magic to remove the replicant as well?

Thank you! Much appreciated.