Page 1 of 1

How to permanently delete all files in a folder?

PostPosted: Wed May 04, 2022 3:35 am
by kelvinl
Hi,

I would like to know how I can delete all files in a folder using Hazel. Here is what I need to achieve:

- Permanently delete all files in the Documents, Downloads, and Desktop folder if the file is older than 2 hours (Not just going to trash but permanently deleting files)

OR

- Permanently delete all files in the abovementioned folders upon logoff using Hazel. Not interested in messing around with Automator/Apple scripts etc, if possible.

Thanks in advance

Re: How to permanently delete all files in a folder?

PostPosted: Wed May 04, 2022 11:08 am
by Mr_Noodle
There's no built-in action to permanently delete files. You can have Hazel purge files from the trash but they need to go to the trash first.

Re: How to permanently delete all files in a folder?

PostPosted: Wed May 04, 2022 1:28 pm
by kelvinl
Thanks for the reply.

Ignore the "permanently delete" part, how can I delete all files in a specific folder and move the files to the trash based on the age of the files? Like doing an "hourly cleanup" of a folder?

Re: How to permanently delete all files in a folder?

PostPosted: Thu May 05, 2022 9:28 am
by Mr_Noodle
You can do something like "Date added is not in the last X hours/day/etc, Move to trash" should do it. If you need to go into subfolders, check the manual on how to get Hazel to do that.