Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

add file to existing zip-file  RSS feed

 
robert isidorson
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to add a file to an existing archive, but the result is that the archive only contains the latest file i added. How do i do this?
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think the Java API allows you to do this without extracting the entire ZIP to some temporary folder, and then re-zip everything.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jakarta Commons Compress API looks like it supports modification of ZIP files. (There's no release yet, so you'll have to get it from the source code repository.)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!