Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Selectively shred files with an Applescript droplet' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Selectively shred files with an Applescript droplet
Authored by: chyna4xena on Apr 19, '07 05:17:23PM
I created an Automator-based Finder plug-in to achieve this sort of functionality. I find it easier to use the contextual menu instead of a droplet.

To create the plug-in:

1) Open Automator, and add two actions: Finder > Get Selected Finder Items, followed by Automator > Run Shell Script

2) In the Shell Script section, set Shell to /bin/bash, set Pass Input to as arguments, and enter the following in the command box

for i; do
intrsh=`echo -n "$i" | grep .Trash`
if [ -n "$intrsh" ]; then
rm -rf "$i"
3) Select Save As Plug-in from the File menu, choose a Finder plug-in, and call it something obvious like Delete From Trash.

To use, just select the specific items that you want to delete, control-click to get the contextual menu, and select Automator > Delete From Trash (or whatever you called the plug-in).

For safety, it will only delete items in the trash (with .Trash in their path). Otherwise, if you control-clicked on your hard drive and selected the plug-in it would delete most non-system files!

[ Reply to This | # ]