Page 1 of 1

Have I got this right - Nested Conditions?

PostPosted: Sat Aug 20, 2022 4:16 pm
by mthomas
Hi all,

I'm trying to set a rule up whereas,

My Water Bill is scanned into Dropbox and OCRd into SnapScan Folder
Hazel Watches that folder and looks to see if the document contain matches ANY of the following

5380912300100004
5380 9123 0010 0004
53809 123 001 0000 4

If so, EXTRACT the date from the document as DD MMMM YYYY

then

Rename the document and change the date convention to

YYYY-MM-DD - Yorkshire Water.PDF

https://www.dropbox.com/s/9oozly09uwb2wnc/Screenshot%202022-08-20%20at%2021.14.03.png?dl=0

I'm just bit confused with the OR conditions

So in summary, how do I set a nest of conditions with an OR, and include an AND?

Hope this make sense.
Cheers

M

Re: Have I got this right - Nested Conditions?

PostPosted: Mon Aug 22, 2022 9:40 am
by Mr_Noodle
You have a nested condition there but only one condition under it. You need to add the condition under it if you want those conditions to be "anded" together. The result of that will be "or" with the conditions at the top level.

Re: Have I got this right - Nested Conditions?

PostPosted: Mon Aug 29, 2022 7:55 am
by mthomas
Ah thanks for this :)

Can I ask, once I've extracted the year from the document and renamed the doc, is there a way to instruct Hazel to file the doc in the matching year folder?

i.e. 2009-02-23 - Yorkshire Water.PDF, would be moved to the 2009 folder?

Cheers

Re: Have I got this right - Nested Conditions?

PostPosted: Mon Aug 29, 2022 9:03 am
by Mr_Noodle
If you extract the year, you can use that custom attribute in a Sort into subfolder action.