Page 1 of 1

Labelling folder trees based on file modification date

PostPosted: Sun Jan 14, 2018 9:58 am
by KevinC
Hi

I’d appreciate suggestions for the following:

I’m trying to label folders based on whether their, or their sub-folders', content has been changed in the last day. So if a file (no matter how deep) in the folder structure has been modified in the last day, I'd like all of the parent folders to be labelled.

So, in the following I’d like each of the * to have a colour label:

Folder *
> Sub-Folder 1 *
>> File changed in last day *
>> File not changed in last day
>Sub-Folder 2
>> File not changed in last day

I have rules that operate on “Folder”:
(1) Run rules on sub-folders
(2) If “not modified in last day” label green

This labels the relevant file as green, but not Sub-Folder 1, and I don’t understand why.

In order to label “Folder” as green, I imagine I’ll need to establish a rule for the parent folder of “Folder”; any other thoughts are welcome.

Thanks in advance

K

Re: Labelling folder trees based on file modification date

PostPosted: Mon Jan 15, 2018 11:10 am
by Mr_Noodle
A folder's modified time is only updated if a file is added or removed from it. It won't reflect changes to files that are already there.

Check out the rule here: http://www.noodlesoft.com/forums/viewto ... 1593#p6500

That matches if anything has changed underneath a certain folder. You should be able to adapt that to your needs.

Re: Labelling folder trees based on file modification date

PostPosted: Mon Jan 15, 2018 4:56 pm
by KevinC
Thank you. Just what I needed. Also helps me to understand Hazel a little better.