This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Zipping subdirs along with files" Watch "Zipping subdirs along with files" New topic
Author

Zipping subdirs along with files

r_harvey
Greenhorn

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
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"r_harvey",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
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.
Thanks.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Zipping subdirs along with files
 
Similar Threads
directories/file reading
Why doesnt oracle share source codes for all its classes ?
Downloading a multiple file from server
Zipping Subdirs
Help with recursion and files