Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running on a Windows 7 computer and there is a directory that contains more than 10,000 compressed files (RAR, ZIP) with more added on a daily basis.

Is there any application or script available that will allow me to determine and monitor the total space saved due to file compression? I know that the file compression ratio is shown when I view the file properties but it's not feasible for me to view and sum up each file manually.

Furthermore, I guess I could maintain two directories, one with uncompressed and one with compressed files but I'm hoping for a more elegant solution.

Thanks!

share|improve this question
    
Thanks for the responses so far. I would like to add that the directory also contains sub-directories and sub-sub directories. It's becoming a much more difficult problem than I first thought –  Walter Aug 2 '10 at 2:54
add comment

2 Answers 2

well, you have to sum up the uncompressed and compressed sizes somehow. you can do this either by iterating over the files again and again and again and calling 7z l file.7z, analyze the last line (which contains compressed and uncompressed sizes) and sum that up with the output of the other files.

or you can store the compressed and uncompressed size in a text file (.csv, could be opened with excel which does excellent number crunching) or in a sqlite db (which can also sum up data).

i would go the "store the sizes somewhere while creating the archives"-route.

and i do not think that there is an application or script out there which does this aleady.

share|improve this answer
add comment

you can download coreutils and gawk for windows . Then on the command line

C:\pics> du c:\pics| gawk "{s+=$1}END{print \"total: \"s\" bytes\"}"
total: 345678 bytes
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.