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


Click here to return to the 'A script to delete DELETED0.TXT Mail.app messages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to delete DELETED0.TXT Mail.app messages
Authored by: timcrawf on Apr 25, '04 09:38:27AM

Could this script be modified (obviously not by me) to have a list of extensions to look for? Such as .pif, .gif, .jpg, etc.
I saw that Rob modified it for .pif, but from the little I understand about scripting, wouldn't it work best with some sort of variable list?

This is a challenge to the scripters in the room.



[ Reply to This | # ]
A script to delete DELETED0.TXT Mail.app messages
Authored by: robJ on Apr 25, '04 03:46:19PM
I don't use Mail but here's a folder action that I have attached to my download folder (on my machine, this is where Eudora's attachments are placed). The folder action can be attached to any number of folders.

 property trashers : {"p7s", "sig"}

 on adding folder items to this_folder after receiving added_items
  repeat with i in added_items
   set info_ to (info for i)
   if name extension of info_ is in trashers or ¬
    name of info_ is "DELETED0.TXT" then
    tell application "Finder" to delete i
   end if
  end repeat
 end adding folder items to
-- Rob

[ Reply to This | # ]