Page 1 of 1

Matching full words not partials

PostPosted: Fri Jul 26, 2024 8:06 am
by mark.haynes
Hiya all,

I'm new to Hazel and trying to figure this one out.

I have set up a rule that if the name contains cho to move a file from desktop to docs.
The problem is if the file name has chocolate for instance this also moves.

Examples of what I want to move and what I don't are below:

Ad for CHO.pdf - Should move
Chocolate Ad.pdf - Should NOT move
CHO - Advert.pdf - Should Move
cho-ad.psd - should move
hot chocolate.pdf - should not
choose this file.psd - should not.

Can you suggest what I use to match this?

Many Thanks

Re: Matching full words not partials

PostPosted: Fri Jul 26, 2024 9:34 am
by Mr_Noodle
You can try looking for "cho " (that's a space after the word" and "cho.". Not ideal but should get the job done for most cases. Or use a pattern so you can match symbols or numbers (basically anything that isn't another letter). You will probably also have to match against Full Name so you get the extension included.