I'm not really sure, but you can treat zip archives as normal folders. So would be advised to use the elements provided in IO namespace.
Hello
As the title says, how can I add files into an Existing Zip archive, and replacing existing entries in it?
I've tried using the DotNetZip library, can't really find a way to do it.
So anyone that has any idea how it can be done, or have a library to recommend, please help!
Currently the method I'm using is to:
1. Copy the MainZip.zip to a folder.
2. Extract files in MainZip.zip to a temp folder.
3. Write FilestoAdd.zip to the temp folder.
4. Extract FilestoAdd.zip to the temp folder, (replacing existing)
5. Archive the entire temp folder and name it "MainZip.zip"
6. Delete the original MainZip.zip
7. Move newly archived MainZip.zip into original folder.
8. Delete temp folder.
As you can see, this is very long and troublesome, so I'm looking for a shorter path.
Do share your ideas!
Thanks
Last edited by leejw29; 12-30-2013 at 08:42 AM.
I'm not really sure, but you can treat zip archives as normal folders. So would be advised to use the elements provided in IO namespace.