Run Action if ALL files in a directory pass a rule

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

I have a download script that backs up my website and puts the tar info a directory such as "~/backups". Is there a rule that I can setup so that if all the files in the directory are older than 24 hours then perform an action?

Basically I want Hazel to run an action if for some reason the backup directory does not have a file that has been modified in the last 24 hours.

Thanks in advance, Scott
scottfwalter
 
Posts: 47
Joined: Thu Jan 03, 2013 11:10 am

You might want to set it up instead where you monitor one folder up, and then setup the rule to match the folder containing the files. If you hold down option while clicking the + button to create a new condition. That creates a nested condition where you can set up conditions based on the files within the folder.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks that sounds like it should work!
scottfwalter
 
Posts: 47
Joined: Thu Jan 03, 2013 11:10 am

should also be doable with a single set of conditions…

if all the following conditions are met
Date Added is among the 1 most recent
Date Added is not in the last 1 day
ecormany
 
Posts: 28
Joined: Wed Apr 25, 2012 6:15 pm


Return to Open Discussion