This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Zipping Subdirs  RSS feed

 
Bob_Harvey
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to zip up the contents of a selected directory. Zipping up 'files' in this directory is no problem. However, my 'zipping' needs to be able to handle subdirs(and subdirs and so on) in that particular directory. Does anyone have some code examples that I could see for this? I was thinking that I need to utilize recursion to traverse the file structure below the selected directory and handle the zipping. Is there a more simpler way? Anyone have any example code for this is very much appreciated!
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Bob_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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!