Deleting a file, not Moving it to Trash

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

Moderator: Mr_Noodle

Deleting a file, not Moving it to Trash Wed Dec 09, 2015 6:34 pm • by Phantom27
Is there a way in Hazel to delete a file instead of moving it to trash? (I know all the reasons you would NOT want to do this, but assuming I do want to....) Shell script maybe?
Phantom27
 
Posts: 13
Joined: Mon Sep 09, 2013 11:08 pm

Re: Deleting a file, not Moving it to Trash Thu Dec 10, 2015 11:34 am • by Mr_Noodle
Yes, I would highly recommend against doing this, especially when using an automated tool like Hazel. But if you must, it would have to be a shell script. The 'rm' command is probably what you want to use here.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Deleting a file, not Moving it to Trash Thu Dec 10, 2015 3:58 pm • by Phantom27
Thank you. Would you be able to help me craft the script? That's beyond me. I want it to auto delete all files matched with hazel.
Phantom27
 
Posts: 13
Joined: Mon Sep 09, 2013 11:08 pm

Re: Deleting a file, not Moving it to Trash Thu Dec 10, 2015 4:18 pm • by Mr_Noodle
I can't really provide support by writing scripts, especially for something that I cannot sanction since I consider it very unsafe. You should consult shell scripting resources for something like this.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Deleting a file, not Moving it to Trash Thu Dec 10, 2015 4:46 pm • by Phantom27
Ok, I appreciate the help though. I also completely understand your hesitation. However, I am planning on matching a very specific file type in the downloads folder only so even if it deleted something else, it wouldn't be a big deal.

I'll see if I can figure out how to write the script.
Phantom27
 
Posts: 13
Joined: Mon Sep 09, 2013 11:08 pm


Return to Support