Page 1 of 1

Rule to check if folder is empty?

PostPosted: 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?

Re: Rule to check if folder is empty?

PostPosted: 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.

Re: Rule to check if folder is empty?

PostPosted: 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.

Re: Rule to check if folder is empty?

PostPosted: Tue Apr 28, 2015 3:48 pm
by Jono
OK, I'll try it that way. Thanks.