Rule to check if folder is empty?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Rule to check if folder is empty? Tue Apr 28, 2015 5:33 am • by Jono
Is it possible for Hazel to check if a folder is empty? (main folder added to Hazel, not a subfolder)

If possible I want to monitor a shared Dropbox folder and have Hazel notify me (run a Growl script to push a notification to my phone) when file(s) are removed to leave the folder empty.

I guess I could add a rule to the folder above it to check if the named sub-folder's size is less than a certain size? Just wondering if I could add a rule to the main folder to check if it's empty instead?
Jono
 
Posts: 26
Joined: Wed May 09, 2012 5:52 am
Location: UK

Re: Rule to check if folder is empty? Tue Apr 28, 2015 10:20 am • by thierry
Hi Jono,
I'm not expert at all. Just starting to play with Hazel.
I was also looking for empty folder, to clean them out. I found some info in the forum about "checking the size of the folder".
For me it worked, when the folder is size = 0, I can delete it.
I don't know if it works for your need.
thierry
 
Posts: 1
Joined: Sun Apr 26, 2015 4:47 pm

Re: Rule to check if folder is empty? Tue Apr 28, 2015 11:51 am • by Mr_Noodle
You can't really do it to the folder being monitored since the rules always apply to things inside it, not the folder itself. As you surmised, you'll have to monitor the folder above it and match that folder.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rule to check if folder is empty? Tue Apr 28, 2015 3:48 pm • by Jono
OK, I'll try it that way. Thanks.
Jono
 
Posts: 26
Joined: Wed May 09, 2012 5:52 am
Location: UK


Return to Support