File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Zipping subdirs along with files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Zipping subdirs along with files" Watch "Zipping subdirs along with files" New topic

Zipping subdirs along with files


Joined: May 29, 2001
Posts: 1
I need to zip up the contents of a selected directory. Zipping up files in this directory is no problem. However, my 'ziiping' needs to take into account if the dir has subdirs in them. Does anyone have some code examples that I could see for this? I was thinking that I need to utilize recursion. Any help is appreciated.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
subject: Zipping subdirs along with files