Batch Compression - One archive per File
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Batch Compression - One archive per File
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?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
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.
And for the batch file part
if you're not using a file it's %i instead of %%i
Code: Select all
FOR /R %%i IN (*) DO 7z a -tzip %%i.zip %%i- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
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 %?
The documentation seems really good for the most part but I'm a bit confused trying to reference some of the switches and %?
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
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)
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)