Do you like to save your chat transcripts?

It's easy enough to have it done automatically for you in iChat's preferences. And it's a good idea to do because it's really easy to accidently close a chat window without thinking about it. Oops! There goes that important information I needed! But there is just one problem...iChat doesn't delete older chat sessions, and there is no way to tell it to! So if you do a lot of chatting, you end up with thousands of old chat transcipts sitting in your ~Documents/iChats folder wasting MB's of space!
Now you could just go in there and delete them periodically...but the problem with that is you might just delete chat session that just occured, and you needed that important phone number or address. So I whipped up a tiny little program to delete those pesky old chat transcripts for me! When you run it, the program will reliably delete any chat transcripts older than a week (or however many days you specify).
The program is open source as well, and you are completely free to do WHATEVER you want with it. You can read the code to see how it works, or maybe (if you are a fellow programmer) alter it slightly to delete other types of files as well.
So what are you waiting for, Download Now
The download includes:
iChatClean.java -Java source file *.class files -The compiled files Manifest file -Jar information iChatClean.jar -The program to run
Running the program:
To run the program you may simply double-click the iChatClean.jar file. This will delete any old chat sessions older than 1 week.
Alternatively you may run the program from the terminal.
Assuming it is sitting inside the folder /usr/local/binjava -jar /usr/local/bin/iChatClean.jar
If you want to specify the number of days old a file must be, just pass it as an argument. For example, if we wanted to delete everything older than 2 weeks (14 days) we could run
java -jar /usr/local/bin/iChatClean.jar 14
Automating the program:
Want this program to be run automatically on a daily basis? What a coincidence...so did I! That way you never have to worry about running it yourself. So did I program that into my program? Of course Not! Not with all the tools already available on this wonderful Unix machine! I can just use cron to have it run automatically.
Not familiar with cron? It's a program that is running on your Mac right now. It always runs in the background and has one purpose...to schedule other programs to run whenever you want them too! For an excellent tutorial on cron, try this O'Reilly Tutorial.
Already familiar with cron? Just add this to your crontab:
# Delete old iChat logs every dat at 5 AM
0 5 * * * /usr/bin/jar -jar /usr/local/bin/iChatClean.jarMind your crontab syntax! It goes "zero" tab "five" tab "*" tab...etc