Adding files to an existing zip

Apr 12, 2011 at 6:02 PM

I have a zip file with files already in it and I'm trying to just add new records in it while keeping the original files in it. When I do the following it just overwrites the zip file I already have.


 Dim masterzip As ZipFile
            masterzip = New ZipFile




I can't find a way to append files into a zip without fully extracting the zip and then adding my file then zipping it up again. Any ideas?

Apr 12, 2011 at 6:23 PM

Is there a way to say that my zipfile is an exiting file instead of saying its a new zip file??? Can I state the path of the zip that I want to add files to?

Apr 13, 2011 at 12:14 PM

yes - use the ZipFile constructor that accepts a path.

Check the documentation for more information.

Jun 9, 2014 at 6:26 AM
Hi, you can use ZipFile.Read() method
using (var zip = ZipFile.Read("Your existing"))
    zip.AddFile("New File.txt");
Jun 9, 2014 at 8:31 AM
this library works with Windows phone?