wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How to extract a folder and its contents from inside a zip file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to extract a folder and its contents from inside a zip file?" Watch "How to extract a folder and its contents from inside a zip file?" New topic
Author

How to extract a folder and its contents from inside a zip file?

Ong CherYee
Greenhorn

Joined: Jan 17, 2008
Posts: 11
There is a zip file which contains a folder inside it. The folder itself contains a few files. I would need to know how to extract the folder (with its contents) from inside a zip file.

I have found a few unzipping code samples which show how to handle a folder inside a zip file. An example is shown below:



The code sample which deals with the part where the zipEntry is a directory creates a directory with the same path and name. ( if(isDirectory){ )

Another similar variation is:


When the code creates a directory for the folder, does it unzip the contents inside the folder as well?

If not, how do I extract the files inside the folder?
[ April 09, 2008: Message edited by: Ong CherYee ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to extract a folder and its contents from inside a zip file?
 
Similar Threads
Exception in thread "main" java.io.FileNotFoundException: ReadZip (Access is denied)
problem using getSize on classes in jar file
Extract .Z files
Zip question
Extract File From Zip Archive