Seeking Advice on Automating Archive Cleanup + Rename Rules
Hi everyone,
I’ve been using Hazel for a while now and it has been awesome for keeping my folders tidy, but I’m looking to take my setup a bit further and could use some community insight.
What I’m trying to do is:
1. Automatically clean up old downloaded archive files (e.g., .zip, .rar, .7z) after a set period (say 30 days), but
2. Before removal, extract them to a dated folder (e.g., YYYY-MM-DD Archive Extractions) and
3. Rename the extracted contents based on metadata (like a prefix using the archive name + a date stamp).
I’ve got the basic cleanup working, and I’ve also got extraction to a folder working separately, but when I try to combine the extraction, rename, and cleanup all into a single rule with multiple actions, Hazel doesn’t always behave as expected.
Specifically:
* Some archives extract correctly but the renamed files don’t get renamed consistently.
* If the archive name has special characters, the date rename action fails or gets skipped.
* Once extraction is done, I’d love the original to be moved to a “Processed Archives” folder before the 30-day auto-delete triggers.
Does anyone have tips or example rules/scripts (AppleScript / Hazel advanced rules / shell) that do something similar? I’m happy to share my current rule setup and debug logs if that helps — just let me know what format is most useful.
Thanks in advance for any suggestions!
I’ve been using Hazel for a while now and it has been awesome for keeping my folders tidy, but I’m looking to take my setup a bit further and could use some community insight.
What I’m trying to do is:
1. Automatically clean up old downloaded archive files (e.g., .zip, .rar, .7z) after a set period (say 30 days), but
2. Before removal, extract them to a dated folder (e.g., YYYY-MM-DD Archive Extractions) and
3. Rename the extracted contents based on metadata (like a prefix using the archive name + a date stamp).
I’ve got the basic cleanup working, and I’ve also got extraction to a folder working separately, but when I try to combine the extraction, rename, and cleanup all into a single rule with multiple actions, Hazel doesn’t always behave as expected.
Specifically:
* Some archives extract correctly but the renamed files don’t get renamed consistently.
* If the archive name has special characters, the date rename action fails or gets skipped.
* Once extraction is done, I’d love the original to be moved to a “Processed Archives” folder before the 30-day auto-delete triggers.
Does anyone have tips or example rules/scripts (AppleScript / Hazel advanced rules / shell) that do something similar? I’m happy to share my current rule setup and debug logs if that helps — just let me know what format is most useful.
Thanks in advance for any suggestions!