tags:

views:

51

answers:

3

Guys is there a way to add all the zip files to a new zip file.

+1  A: 

Your question is not very clear... But you should have a look to the java.util.zip package...

EDIT : if you want to use a library, you can also take a look at the apache's commons compress library (at http://commons.apache.org/compress) that allow you to create an ArchiveOutputStream and add your files as ZipEntry (see the example in the javadoc : http://commons.apache.org/compress/apidocs/org/apache/commons/compress/archivers/ArchiveStreamFactory.html)

Vinze
@vinze i should create a zip file which contains another zip file .
Suresh S
A: 

yes. but the compressed file size don't change so much

This [article][1] explains it so well

Hope it helps you

[1]: This article explains it so well: http://kb.winzip.com/kb/?View=entry&EntryID=104

SDReyes
...and may well get bigger.
T.J. Crowder
@SDReyes is it similar to adding txt files to a zip file
Suresh S
Hi Suresh!I know what you mean (both can be though as an big array of data). but their contents are quite different.Hope it helps : )
SDReyes
A: 

In a terminal (if your OS is Linux or Mac or you have Cygwin in Windows):

gzip *.zip > newzip.zip
psihodelia
The OP tagged his question with Java, so I doubt s/he's looking for a shell solution.
Thomas
Um? `gzip` is for *.gz files. The `zip` and `unzip` utilities deal with *.zip files.
crazyscot