Hazel can't match any "Contents contain" in PDF files

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

A lot of my rules rely on the "Contents contain" option.

I was on vacation and my Mac was turned off. Now that I'm back, Hazel stopped matching the text inside the PDFs and no files get moved or renamed.

I'm able to copy the text in the PDFs to any text editor and they are exactly the same as the ones in the Hazel rules.

All my files are in Onedrive (Apple Silicon version).

What can I do to make Hazel "read" text correctly inside the files again?
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

"Contents contain" uses Spotlight so it may be the case that Spotlight is not indexing your files. You can either look into fixing that or use "Contents contain match", which skips Spotlight. It's more reliable at the expense of some performance.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

"Contents contain match" does the trick, thank you.
The problem is that I have dozens of rules accumulated along the years that use "Contents Contain". It'll take a while to update them all.

I'll investigate more on why "Contents contain" is not working.
I reindexed my user folder in Spotlight, but Hazel still couldn't read inside the files.

Spotlight is able to find the files in a search, but I didn't know that it's also responsible for the indexing of the text inside the files.
Maybe it's a problem with this new macOS cloud storage default location that OneDrive is using.
Also, OneDrive for Apple Silicon is still in preview (beta), it can be a bug introduced on an update.
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

I am glad to discover the reason why "Contents Contain" did not work. I still have no idea how to fix that. In any case, it does not really matter as using "Contents contain match" was the workaround. For months I automatically use "contents contain match" because it's the only one which works for me.
Trickyt57
 
Posts: 55
Joined: Tue Sep 18, 2018 12:17 am


Return to Support

cron