Page 1 of 1

Trying to understand 'Date Added Is not among the...'

PostPosted: Thu May 10, 2018 4:25 pm
by Colin
Hi,

I have Hazel set to automatically cull my Lightroom catalog backup files:

If all of the following conditions are met:
Kind > Is > Folder
Date Added > is not in the last > 2 weeks
Date Added > is not among the > 12 most recent

Do the following:
Move > to folder > Trash

So, basically, trash backups that are older than 2 weeks old and not among the 12 most recent.

It sort-of works... old folders are getting trashed, but I still see 8 folders that are older than 2 weeks AND are not among the 12 most recent. When I test a folder that should meet the criteria, it fails to match the last rule (date is not among the 12 most recent). What am I not getting here?

Thanks.

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Mon May 14, 2018 10:53 am
by Mr_Noodle
Can you email/post the dates of all the items in the 12 most recent (which I'm guessing is more than 12)?

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Tue May 15, 2018 12:09 pm
by Colin
Sure:

Image

And the rule:

Image

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Wed May 16, 2018 10:44 am
by Mr_Noodle
Note that date modified is not the same as date added. Can you double-check the date added in Hazel on each of the files and see if any are more than two weeks old?

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Wed May 16, 2018 6:04 pm
by Colin
Sure—date created, added & modified are all the same:

Image

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Thu May 17, 2018 11:07 am
by Mr_Noodle
Sorry, should have been more specific. That view in Finder can be very inaccurate when it comes to date added. Many times, it will grab the date modified.

To get an accurate date added, try the "Get Info" window in Finder. Alternatively, use Hazel's preview function on the file and view the date added there. No need to post each one but check each one and report back on whether they all satisfy the conditions.

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Fri May 18, 2018 12:54 am
by Colin
Same result:

Image

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Fri May 18, 2018 11:06 am
by Mr_Noodle
In that case, check Hazel's preview. As shown, there is no date added and the normal Finder window makes one up from the other dates. Hazel does record its own date added should the system one end up not being filled in.

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Fri May 18, 2018 11:19 am
by Colin
Hazel does record its own date added should the system one end up not being filled in.

Now you've lost me. I ran a preview on the same file as posted above and it does not check out. Why is that? How am I supposed to know what Hazel thinks the date added is? Is it just possible this is a bug?

Also, I don't know why the image previews here in the forum are so large... Is there a way to control that?

Image

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Mon May 21, 2018 10:35 am
by Mr_Noodle
Click on the badges. They will show you the value for that attribute.

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Mon May 21, 2018 2:02 pm
by Colin
Noodle, assume the file was added when it says it was added. I ran preview check on all 20 of the files in that folder and they were all added when they said they were added—these folders are getting hung on the counting step (is not among the 12 most recent), not in the "in the last two weeks" step.

What ELSE could be the problem here? Would this have something to do with APFS? If I can't trust the Finder to give me the correct 'added' date, or Hazel to be able to correctly count the number of things in a folder (yes, I checked—there are NO hidden files in this folder), then how am I supposed to use this condition in Hazel without wanting to tear my hair out in frustration every single time?

Here's Hazel saying the folder was indeed added on 4/17. I just ran the rule manually using from the menu bar today, over four weeks after it was added, and over two weeks since Hazel should have deleted it according to the logic which, to me, should be perfectly clear:

If ALL of the conditions are met:

1. Kind: is Folder
2. Date Added: is not in the last 2 weeks
3. Date Added: Is not among the 12 most recent

Image

Image

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Mon May 21, 2018 2:58 pm
by Mr_Noodle
Actually, I just remembered a change that was made to "is among the". Any other conditions in the same nesting group affect the files that are considered for "is among the". In this case, it's looking for the top 12 out of folders not in the last two weeks. That means that folders within the last two weeks aren't taken into account in terms of the top 12 ranking.

To get the behavior you want, put the "is among the" in its own nested condition by itself.

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Mon May 21, 2018 7:49 pm
by Colin
That seemed to work (once I looked up how to make a nested condition). I'm not sure how I'll come to that solution in the future though...

One issue I have with Hazel is it's pretty spartan language & interface... I guess I assumed that rules "read down", and were inherently conditional. Does that make sense?

Re: Trying to understand 'Date Added Is not among the...'

PostPosted: Tue May 22, 2018 10:43 am
by Mr_Noodle
Keep in mind that how you originally thought it worked was originally how it worked. Users started a campaign to change it to how it is now as they thought it was more intuitive. I conceded as there was no way to do it the way they wanted so the current system is a way to allow both. Problem is is that it won't be intuitive for one of the options.