Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Monday, November 27, 2006

Multi File Batch Compression

I was working today when suddenly I have a warning on my taskbar, stating that I am low on disk space on drive D:. This was actually contributed by the MySQL data backup that I scheduled everyday. Before I store these files to the main server, I have to compress them in zip format. So when I saw these files, I was stunned because there was a lot of files. Gigabytes. Compressing all of them into a single file is unacceptable, and compressing them one by one is a tedious task.

So what's my solution?

Batch compression
I'm not really good at Windows BAT file programming, so I use Java to act as a batch script(aka console application) to compress the files individually. Quite simple really. Get the files in the directory, filter it by .sql, called a command line compressor and compress it one by one.

I used ConTexT for my editor, and the 7z.exe executable to compress the files one by one. Nice eh? Probably I will post the source code tomorrow.

Maybe I can use the same concept to rename my Anime into another naming convention of my own: [DB]_Naruto_-_208_[FEDFED].avi to Naruto 208 [DB] [FEDFED].avi. Well that something to consider.

Monday, July 31, 2006

AJAX Developer Resource Center

Resources from Sun Microsystem. Check it out!

Get ahead of the curve and start developing AJAX applications today. This is your source for Java tools, technologies and expert advice.
Read More|Digg This Story!