I'm fairly new to the OS X world, and noticed that I kept forgetting to empty my trash. That's because, with Windows, I got used to using Shift-Delete, which deletes immediately. I figured that it's better to hold on to those files a few more days before throwing them out, though, so I found my self in need of a script to do this.
I started to look around and found two scripts here on this site:
This script will only run when you delete a file, and it's not very complicated but it works. It securely deletes files in the trash after seven days (you can pick any number you like; this works for me because I know I'm not going to use the files anyway after having them in the trash for seven days). Here's the code:
Save the code as a script in the folder /Users -> your_username -> Library -> Scripts -> Folder Action Scripts, then open the app Folder Actions Setup (in the Applications -> AppleScript folder), and manually add the folder ~/.Trash as an action folder, and then add this script to it. Then try trashing! (If you're lazy, trashtimer will be the better option for you, because it's even easier to install.)Mac OS X Hints
http://hints.macworld.com/article.php?story=20090205033328460