Page 1 of 1

Move folder contents to Trash; leave folder

PostPosted: Sun Dec 04, 2022 11:12 pm
by TallTrees
I've written a rule that checks for subfolders named "Output" that have a size greater than 1 byte. I'd now like Hazel to move the contents (including other subfolders) of the Output folder to the Trash, but I'm not exactly sure how to do that, without also moving "Output" to the Trash as well.

Also, is there a better way to determine if a folder is empty, than using size greater than 1 byte?

Re: Move folder contents to Trash; leave folder

PostPosted: Mon Dec 05, 2022 10:47 am
by Mr_Noodle
You can set up a rule to go into the output folder (see manual about going into subfolders). You can then have a separate rule to check if it's parent is the output folder (see manual about nested conditions) and deal with them appropriately. Give that a try and report back if you run into any problems.

Re: Move folder contents to Trash; leave folder

PostPosted: Mon Dec 05, 2022 8:52 pm
by TallTrees
Mr_Noodle wrote:You can set up a rule to go into the output folder (see manual about going into subfolders). You can then have a separate rule to check if it's parent is the output folder (see manual about nested conditions) and deal with them appropriately. Give that a try and report back if you run into any problems.


Worked like a charm! Thank you!