How do place files in zip folder programmitcally

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,283
Location
Norway
Programming Experience
10+
A zip is really a file, not a folder, but with Windows XP it is built into the Explorer to handle these files as folders. To use this feature programmatically add first reference to COM library 'Microsoft Shell Controls And Automation'. Then use the ShellClass and CopyHere method. There are some code examples here:
- compress (existing and new zip): http://www.xtremevbtalk.com/showthread.php?t=263973
- decompress: http://www.codeproject.com/csharp/decompresswinshellapics.asp

Else there exist a number of libraries (free or pay) to handle compressed archives like zips.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,283
Location
Norway
Programming Experience
10+
Speaking of which, the not unknown free library SharpZipLib updated to version 0.85 just the other day and now supports adding files to existing ZipFile.
 
Top Bottom