Page 1 of 1

Deleting a file, not Moving it to Trash

PostPosted: 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?

Re: Deleting a file, not Moving it to Trash

PostPosted: 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.

Re: Deleting a file, not Moving it to Trash

PostPosted: 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.

Re: Deleting a file, not Moving it to Trash

PostPosted: 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.

Re: Deleting a file, not Moving it to Trash

PostPosted: 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.