Run a rule when moving file to Trash

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

Moderator: Mr_Noodle

Run a rule when moving file to Trash Mon Mar 25, 2019 10:52 am • by dhegyi
Hi, I'd like to run rules when I move files to the trash. Is this possible?

Thanks, Daniel
dhegyi
 
Posts: 2
Joined: Mon Mar 25, 2019 10:49 am

Re: Run a rule when moving file to Trash Mon Mar 25, 2019 11:04 am • by Mr_Noodle
You can add your trash folders to Hazel and add rules but I would not recommend it. They may end up fighting with the regular trash cleaning behavior.

What kind of rules are you looking to add?
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Run a rule when moving file to Trash Mon Mar 25, 2019 11:20 am • by dhegyi
I have two computers with some movies / TV shows. When I delete a show on one of them I'd like the other computer to also delete the file.

The way I thought to accomplish this is:
1. I have Hazel running on both computers
2. When I delete a show Hazel will add the name of the file that has been deleted to a folder in my Google Drive. The folder is called "_trashed_tvshows". (Both computers have access to the Google Drive)
3. Hazel will have rules on "_trashed_tvshows" folder to search the "TVShows" folder for files of same name and delete them. (I don't know how to do this yet...)
dhegyi
 
Posts: 2
Joined: Mon Mar 25, 2019 10:49 am

Re: Run a rule when moving file to Trash Tue Mar 26, 2019 9:33 am • by Mr_Noodle
That would require a script as there's no way to correlate them. Also, Hazel does not have any action to delete a file outright; You can only move them to the Trash.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support