How do place files in zip folder programmitcally

ImDaFrEaK

Well-known member
Joined
Jan 7, 2006
Messages
416
Location
California
Programming Experience
5-10
That's just it. How do I place a file in a zip folder programmatically?
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,297
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.
 
Top Bottom