Search for highlighted text?

I have a large number of records that I’ve been going through and high lightening text relevant to a project. In cases where the text (in the appropriate form) isn’t present, I move the record to a “not relevant” folder. Today I discovered that, in the eye-blurring process of sorting through 50k+ of these records, I had inadvertently moved records with the correct text (that was also highlighted) into this folder. Is there a way I can search the folder for highlighted text of any sort (just searching for a term or phrase won’t work)?

e.g. For whatever reason, if I had the sentences “Bob ran to the store” and “Fred is a good swimmer,” would there be a way to track them both down based solely on the fact they were highlighted?

What are these documents? PDF? RTF? Something else?

Sorry. RTF.

Menu Go > Next Highlight / Previous Highlight, though you would need to open each document. Beyond that, a tool to do this could be scripted.

Guess I’m looking for a tool then (have to crawl through about 4,000 files otherwise). :slight_smile:

It would probably be faster to use the script Scripts > Data > Merge Highlights (Rich). If this script is not installed, open Help > Support Assistant > Install Extras > Scripts and install “Merge Highlights (2)” (for RTF). Select a group of RTFs and run the script. The script will create a document named “Highlights” in the current group. The document will list the name (a clickable link) of each RTF(D) document that has highlighted text and the highlighted text from that document. Working with the “Highlights” document, you can decide what to do with the documents it finds. You could also modify that script if you wish.

Sounds great! Thanks :slight_smile:

It really does not work. It hangs the software and I have to force to quit.

Works fine over here. If a large number of documents is selected the script will take time to operate, giving the appearance that DEVONthink is in a hang. If there is an actual hang state you should be able to find a hang report in the console, and if you find one it is useful to send it to Support.

Could you please take a little time to explain how this script works? Beacause I do not get anything.

  1. I have one file in rtf
  2. I do a search on this file
  3. I see that the search word is highlighted (more times)
  4. I run the script (rtf)
  5. a new file (Highlights) is created but it completely empty
  6. if I run the plaintext script I get a dialogue that says that there are not highligheted words

This happens also if I do a serarch on two files.

I think you do not need to do the search first, just select all the RTFs and run the script.

? I do not understand.
If i do not perform a search (with the result of highlighting the found words) how can the script merge the highlighted found words?

Thank you.

Emilio, you incorrectly assumed that the highlighting of search terms in the results list resulted in a change in the properties of the files, such as a searchable highlight markup. That’s not true. That’s why the script didn’t work for you.

What Bill is saying is that the script works with document passages that have been highlighted with the Format>Highlight command, or command-shift-L.

You could do the search that you tried earlier, then apply the Highlight command (menu or command-shift-L), and DEVONthink will highlight all the search terms. Once you have done that, the script will work for you.

I am sorry! I understood wrongly. Now it is clear that the script search and collect only words that are highlighted by the reader and not by the software when it performs a search.

Thanks for your patience!