Page 1 of 1

Set size rule for folder or volume to send email

PostPosted: Sun Nov 22, 2015 11:46 pm
by nekton34
I want to use Hazel to send me an email when a folder (or volume) exceeds a size in GB.
I have a email Applescript that runs fine.
The rule is:

KInd is Folder
Size is greater than 18 GB

Do the following to the matched file or folder

Run Applescript Embedded Script (The send email script that I know works)

This setup fails because it seems Hazel INSISTS on applying the rule to all sub-folders inside the selected folder (there are 3 subfolders). If each of these subfolders is bigger than 18 GB, then yes the email gets sent. BUT this is not the behaviour I require and I have not set any option to apply the rule to subfolders.
I simply want Hazel to apply the rule to the PARENT folder only and not to apply it to CHILD folders inside the parent.

The same problem occurs if I set Kind to Volume. The Size rule only works if all the folders inside the volume satisfy the rule condition.

I cannot see what setting I am doing wrong, or is this a bug?

OS X 10.11.2
Hazel 3.3.6

Re: Set size rule for folder or volume to send email

PostPosted: Mon Nov 23, 2015 1:10 pm
by Mr_Noodle
I believe you emailed support about this? If so, I've already replied there but in short, rules always apply to the stuff inside the folder being monitored. If you want a rule to match a folder, you need to monitor the folder that contains it.

Re: Set size rule for folder or volume to send email

PostPosted: Mon Nov 23, 2015 6:40 pm
by nekton34
Thanks,

I understand now, but what do I set if the item to be monitored is a volume? As far as I know, a volume cannot be contained within something.

The actual scenario I was trying to use Hazel for is to monitor the size of a mounted RAID volume so that when the free spaces drops below a fixed number of terabytes, (or vice versa when the size passes a fixed size), it emails me .

Thanks,

R

Re: Set size rule for folder or volume to send email

PostPosted: Tue Nov 24, 2015 12:16 pm
by Mr_Noodle
You can monitor /Volumes (it's hidden in Finder but you can use the "Go" menu to see it). Note that this can be resource-intensive as Hazel will end up calculating the size for the whole volume every time something changes on it.

Re: Set size rule for folder or volume to send email

PostPosted: Sun Jan 31, 2016 4:05 pm
by hazeldrvr
You can monitor /Volumes (it's hidden in Finder but you can use the "Go" menu to see it). Note that this can be resource-intensive as Hazel will end up calculating the size for the whole volume every time something changes on it.


I'm sure I'll feel stupid in a few minutes...I can find the /Volumes folder in finder, but can not figure out how to point Hazel at it. I searched the forum but apparently can't figure out the right search terms for that either. Be gentle :)

P.S. OS X Yosemite

Re: Set size rule for folder or volume to send email

PostPosted: Mon Feb 01, 2016 11:41 am
by Mr_Noodle
Try dragging the folder into Hazel's folder list. Alternatively, click the + button under the folder list and in the file chooser, navigate to /Volumes in the same way you did in Finder.

Re: Set size rule for folder or volume to send email

PostPosted: Mon Feb 01, 2016 11:57 am
by hazeldrvr
I was correct....I feel stupid now!

I actually tried to drag it before, apparently not the right way.

P.S. I just discovered this software and don't want to think about all the time I wasted doing this all this stuff the old way. Your product is awesome. Thanks!