This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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?