Welcome Guest.   Make a donation to an author on the site September 03, 2014, 02:06:03 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2011! Download 30+ custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 3 4 5 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Compressing files into multiple .zip archives with each .zip being independent  (Read 48548 times)
sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: November 29, 2006, 10:47:22 PM »

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.
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: November 30, 2006, 01:37:58 AM »

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 » Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: November 30, 2006, 02:08:22 AM »

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)
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: November 30, 2006, 02:27:09 AM »

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
...
Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: November 30, 2006, 02:30:16 AM »

searched for zip-1.zip...nothing  undecided
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: November 30, 2006, 02:34:05 AM »

Mind giving me a small sample of the filenames you're using?
Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: November 30, 2006, 02:35:42 AM »

ACC35108.jpg
ACC35108L.jpg
...
...
ZNG9264L.jpg
ZNG9269L.jpg
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: November 30, 2006, 02:41:23 AM »

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.
Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: November 30, 2006, 03:00:55 AM »

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
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: November 30, 2006, 03:09:19 AM »

Try the attached version.
« Last Edit: December 05, 2006, 05:30:43 AM by skwire » Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: November 30, 2006, 03:13:12 AM »

Excellent! It is working.

Thanks a ton skwire. I'll blog about your tiny program and give the link here.
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: November 30, 2006, 03:16:33 AM »

Great to hear.  If you'd like, I can make up a GUI for it with options for zip size, output directory, etc.
Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: November 30, 2006, 03:21:28 AM »

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.
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: November 30, 2006, 03:26:59 AM »

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.
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: November 30, 2006, 06:09:52 AM »

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 » Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: December 01, 2006, 11:29:21 PM »

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?


* sri-zip.jpg (129.79 KB, 224x1561 - viewed 808 times.)
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: December 02, 2006, 07:16:19 AM »

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 » Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: December 05, 2006, 05:29:50 AM »

Here's the latest version (v0.0.3) with some fairly comprehensive error-checking.  Let me know how it works for you.  Thanks.


* spinzip-setup.exe (521.92 KB - downloaded 951 times.)
« Last Edit: December 05, 2006, 10:41:35 PM by skwire » Logged

sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: December 05, 2006, 11:05:48 PM »

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.sridhareena.co...ultiple-independent-zips/.
Logged

skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: December 05, 2006, 11:31:34 PM »

You're welcome; I'm happy to help.  =]
Logged

AHMalik
Participant
*
Posts: 18


View Profile Give some DonationCredits to this forum member
« Reply #20 on: December 10, 2006, 08:26:04 PM »

Sorry that I can't find Files page to download.
Regards
Logged
AHMalik
Participant
*
Posts: 18


View Profile Give some DonationCredits to this forum member
« Reply #21 on: December 10, 2006, 08:28:20 PM »

Can someone give me the link io download
Logged
sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: December 10, 2006, 09:13:58 PM »

Malik,

Download it from http://www.donationcoder....topic=6321.0;attach=12926

I also uploaded it here: http://www.sridhareena.co...0v0.0.3/spinzip-setup.exe
Logged

CNeo
Participant
*
Posts: 1

View Profile Give some DonationCredits to this forum member
« Reply #23 on: February 21, 2007, 12:56:09 PM »

Thanks for a great little utility.  I had been scouring Google trying to find a program to do exactly this.  Great site, bookmarked!
Logged
skwire
Charter Member
***
Posts: 4,039



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #24 on: February 21, 2007, 01:14:59 PM »

I did release a later version that isn't on this thread.  You can download it here: http://www.autohotkey.net.../spinzip-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.  =]
Logged

Pages: [1] 2 3 4 5 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.041s | Server load: 0.07 ]