Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!