?
Solved

Make Separate Zip Files of specified size limit

Posted on 2014-10-16
3
Medium Priority
?
302 Views
Last Modified: 2014-10-20
User has multiple pdfs and wasnt to make separate zip archives that don't go over 10 MBs in size. But they don't want to keep making them and guessing how many pdfs to put in them.

Is there a way to use winzip to select the files and set a limit and have it make separate self-contained zip files of the specified size limit?

I found the span and split settings but it seems to make a main zip file and then accompanying files that work with that zip file.

Can they be completely separate?
0
Comment
Question by:mrmyth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
Dr. Klahn earned 2000 total points
ID: 40385831
ZIP is a run-length compression method, so there's no way to tell how big the resulting file will be until the compression process is finished.  Then you look at the resulting ZIP file and say, aha, 10.4 MB.

What you want is something like the WinRAR extended archive feature, where you specify the files you want archived and WinRAR creates multiple segmented archive files under the specified limit.  (see below)  Unfortunately, WinRAR can do this only for RAR files, and it generates one segmented archive as a set of individual files, not multiple archives that fit in the size limit.

new-1.gif
If the customer is not particular about pushing the ZIP file size right up to the 10 MB limit, there is an heuristic you could try, with the knowledge that (a) it's not automatic and (b) occasionally it will fail and the resulting file will be oversize.

Take a wide sampling of the PDF files.  Compress each one individually.  Check the compression factor.  This is the worst case; compression of only one file.  Average the compression factor across all files.

Set a reasonable upper limit for ZIP file size, say 9 MB, which allows slop-over in case of bad compression.

Choose a PDF file, check the size, multiply by the compression factor.  See if this will overrun the 9 MB limit.  If not, add it to the proposed ZIP file.  Iterate until the limit overruns, then back off one file.

Create the ZIP file from the selected files.  Remove the PDF files from the available pool of PDF files.

Iterate until all PDF files have gone into a ZIP archive.

This sounds bad but is pretty quick in a Perl script.
0
 
LVL 1

Author Closing Comment

by:mrmyth
ID: 40393668
Thanks.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40393673
7zip can create volumes (i.e keep files, sort them, and attempt to fit smaller files into X sized archive, unless file is too big)
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your app took Google’s lash recently, here are the 5 most likely reasons.
In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question