Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 01:46:25 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Compressing files into multiple .zip archives with each .zip being independent  (Read 60979 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Anyone know a way to compress about 9000 files into multiple .zip files of 8 MB each?

The individual zip files have to be independent of each other, meaning: each of them should be extractable to get the files inside w/o the necessity of other .zip files.

Thanks for help/ideas.
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Since it's the closest post to the top that I can edit, I'm going to hijack it to provide the latest download link for SpinZip.  I had a report of the links pointing at autohotkey.net not working properly so please use this link instead:

SpinZip v0.0.9.0


~ORIGINAL POST BELOW~
Here's a quick-n-dirty script.  Unzip the attached file to its own folder and run sri-zip.exe (or sri-zip.ahk if you have AutoHotkey installed).  A folder dialog will pop up, select the folder that contains the files you want to zip and click OK.  There's no GUI (except for the tray icon) so a message box will pop up when the app has finished running and you'll find your zips in a "zips" sub-folder of the one you chose when running the script.  Currently, it does no recursion through folders (all your files must be in the folder you chose at the start) so if you want something more configurable, just ask.  I can write up a GUI for it in no time.  Let me know how it works for you.
« Last Edit: January 18, 2009, 07:14:11 AM by skwire »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
skwire: I tried the script. It seemed to be working because I could see some temporary folder/file changing its size while the operation was going on. After some time I got a pop up that it's done. But the 'zips' folder is empty.

Are the new .zip files placed some where else? What will their names be? (so I can do a search)
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Quote
Are the new .zip files placed some where else?

Hmmm...they shouldn't be.

Quote
What will their names be?

zip-1.zip
zip-2.zip
zip-3.zip
...

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
searched for zip-1.zip...nothing  :-\
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Mind giving me a small sample of the filenames you're using?

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
ACC35108.jpg
ACC35108L.jpg
...
...
ZNG9264L.jpg
ZNG9269L.jpg
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Hmmm...not sure what the issue could be.  It works here in my (albeit limited) testing.  Is the zip.exe file in the same folder as sri-zip.exe?  Each zip is generated sequentially so you should be able to watch them be created in the zips folder as the script runs.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Yes. It is in the same folder as sri-zip.exe. Kindly download this screencast and launch skwire.html:

http://www.sendspace.com/file/0f8lzi
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Try the attached version.
« Last Edit: December 05, 2006, 05:30:43 AM by skwire »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Excellent! It is working.

Thanks a ton skwire. I'll blog about your tiny program and give the link here.
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Great to hear.  If you'd like, I can make up a GUI for it with options for zip size, output directory, etc.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Yes. Please do. Being able to specify the max individual .zip file size is useful. Also, if you can code it such a way that there is a provision to enter the name used for the generated zip files.

Like if I enter "skwire", it should output "skwire-1.zip", "skwire-2.zip" etc.

Another way it could be extended is by giving the user an option of output being .zip or .rar.
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Quote
Yes. Please do. Being able to specify the max individual .zip file size is useful. Also, if you can code it such a way that there is a provision to enter the name used for the generated zip files.

Like if I enter "skwire", it should output "skwire-1.zip", "skwire-2.zip" etc.

Easily done.

Quote
Another way it could be extended is by giving the user an option of output being .zip or .rar.

I could write the code to do that, however, the end-user would have to provide the rar.exe themselves since it's not a free program.  If I'm mistaken, somebody please correct me.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
I've attached the setup package for the GUI version.  There is only very basic error checking involved at this point.  Let me know how you like it and if you'd like anything changed.
« Last Edit: December 05, 2006, 05:30:20 AM by skwire »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
skwire:

1. I entered 8 in the Size field and all (almost) the resulting zip files are more than 8 MB in size. Pls chk the attached screenshot. Is this a bug? I think this will be fixed by being able to specify the size field in bytes and not in megs.

2. If the Output directory doesn't exist, even tho the prog says that zip files are generated, they aren't. Ideally the output directory has to be created if it doesn't exist.

3. Rename the program from Sri-zip to "SPinZip" (SP = Span, in = independently). That is, this is a program that generates spanned zip files that are independent of each other. 

4. What's the max. allowable value in Compression field?
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Quote
1. I entered 8 in the Size field and all (almost) the resulting zip files are more than 8 MB in size. Pls chk the attached screenshot. Is this a bug? I think this will be fixed by being able to specify the size field in bytes and not in megs.

No, it's not a bug; it's a by-product of the way the app works.  It goes through the list of files in the folder one-by-one (in order) and keeps track of the total size.  Once the amount goes over the value you entered, it zips those and the process repeats until there are no more files in the directory.  In other words, there is no magic algorithm going on that scans the whole folder and attempts to make perfect-sized zip files.

Quote
2. If the Output directory doesn't exist, even tho the prog says that zip files are generated, they aren't. Ideally the output directory has to be created if it doesn't exist.

Again, there is little to no error-checking implemented at this point; the GUI was more of a proof-of-concept for you.

Quote
3. Rename the program from Sri-zip to "SPinZip" (SP = Span, in = independently). That is, this is a program that generates spanned zip files that are independent of each other.

Can do.

Quote
4. What's the max. allowable value in Compression field?

Nine.
« Last Edit: December 02, 2006, 07:43:02 AM by skwire »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Here's the latest version (v0.0.3) with some fairly comprehensive error-checking.  Let me know how it works for you.  Thanks.

spinzip.jpg
« Last Edit: December 05, 2006, 10:41:35 PM by skwire »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Thanks sk. Works fine. Looks like you improved the compression logic. Now the generated zip files are all less than the max size that we enter in the program.

I blogged about this in my site.

http://www.sridharee...le-independent-zips/.
<a href="https://sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
You're welcome; I'm happy to help.  =]

AHMalik

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 18
    • View Profile
    • Donate to Member
Sorry that I can't find Files page to download.
Regards

AHMalik

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 18
    • View Profile
    • Donate to Member
Can someone give me the link io download

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
<a href="https://sridharkatakam.com">My blog</a>

CNeo

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Thanks for a great little utility.  I had been scouring Google trying to find a program to do exactly this.  Great site, bookmarked!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
I did release a later version that isn't on this thread.  You can download it here: http://www.autohotke...zip-setup-v0.0.4.exe

It offers recursive zipping as well as a single wildcard (*.jpg, etc.) option.  If you find problems with it...don't hesitate to let me know.  Thanks.  =]