Applescript? Nutty?

Posted by: trey

Applescript? Nutty? - 11/30/04 08:02 PM

Okay, here's the text from a post i made over at Apple:<br><br><blockquote><font size=1>In reply to:</font><hr><p>Okay, I know that this is a kind of stupid question, but is there a way to selectively empty the trash? I mean, can you just delete certain items that are in the trash?<br><br>I ask be cause a professor of mine is looking for a way to do this. He doesn't want to hear anything about putting stuff in the trash that he doesn't want to delete.<br><br>So, is there a way to delete only some of the items that are in the trash? I've tried just selecting files and hitting [delete], but that didn't work.<p><hr></blockquote><p>link<br><br>I'm posting here because someone suggested an AppleScript and I thought maybe someone here **cough,Nutty cough,cough** might be able to help out.<br><br>
Posted by: SgtBaxter

Re: Applescript? Nutty? - 11/30/04 11:14 PM

You can always do a <br><br>rm -r <br><br>in terminal, then drag the files that you want to delete to the terminal window from the trash window.<br><br>
Posted by: rman

Re: Applescript? Nutty? - 11/30/04 11:27 PM

I believe that a rm -ir would be better. <br><br>
Posted by: hayesk

Re: Applescript? Nutty? - 12/01/04 01:53 AM

That's probably a good idea. For those that don't know adding -i will ask if you are sure if you want to delete. You probably could write an AppleScript to do it too if he wants a drag and drop solution.<br><br>
Posted by: nutty

Re: Applescript? Nutty? - 12/02/04 08:28 PM

the trash is a special folder. you cant just selectively delete stuff in there.<br><br>you could write a script to get the contents, present it as a pick from list dialog, select a file, move the file to the desktop then rm -r that file<br><br>
Posted by: Carlos Ysunza

Re: Applescript? Nutty? - 11/30/08 02:08 AM

I hope sincerely that your professor wouldn’t be of Logic ;-)