Page 1 of 1
Batch Compression - One archive per File
Posted: Mon Sep 10, 2007 8:49 pm
by JAB Creations
On XP I'm wondering if there is a way to do a batch compression. I essentially want to compress my access logs which are originally compressed via gzip by the server. I've gotten slightly better compression by Winrar and then again a slightly better compression ratio from Winzip. I'd like to essentially tell the program one archive per file ... for four years worth of monthly access logs. Suggestions?
Posted: Tue Sep 11, 2007 2:55 am
by JayBird
I would use the
WinZip Command Line Support Add-on
Then create a batch file to automate the process
Posted: Tue Sep 11, 2007 7:00 pm
by Ambush Commander
7-zip for the win, simply because it's open-source. You can get very good ratios with 7z, although the format is not very well known.
Posted: Tue Sep 11, 2007 8:02 pm
by volka
And for the batch
file part
Code: Select all
FOR /R %%i IN (*) DO 7z a -tzip %%i.zip %%i
if you're not using a file it's %i instead of %%i
Posted: Fri Sep 14, 2007 2:58 pm
by JAB Creations
Thanks for the replies! I've downloaded 7-ZIP (I *have* heard of it btw). Took me only a minute to find (Context-Menu - 7-Zip - Add to archive) where to stick the parameters (kinda cool to have a "console" option in a GUI

) but I'm getting an error "parameter incorrect" and I've modded the parameter in the way Volka suggested too.
The documentation seems really good for the most part but I'm a bit confused trying to reference some of the switches and %?
Posted: Fri Sep 14, 2007 3:19 pm
by JAB Creations
Using max compression...
jabcreations.com_2007-01.gz - 8.85MB
jabcreations.com_2007-01.rar - 4.11MB
jabcreations.com_2007-01.zip - 3.36MB
jabcreations.com_2007-01.7z - 5.24MB (No parameters used/LZMA/Ultra)
jabcreations.com_2007-01.7z - 3.44MB (No parameters used/PPMd/Ultra)
jabcreations.com_2007-01.7z - 5.01MB (No parameters used/BZip2/Ultra)