With Xceed Zip for .NET, ($299), it takes but a single line of code:
QuickZip.Zip( @"d:\test.zip", true, true, false, @"d:\file.txt" );
The middle parameters represent things like specifying whether
existing files will be overwritten and if the directory structure will
be preserved.
Of course, if you need more flexibility, it Xceed Zip for .NET offers
a full Object Oriented FileSystem object model for handling Zip files,
Tar, GZip, files on FTP servers, etc.
http://www.xceedsoft.com/products/zipnet
If you are looking for a free component, try SharpZipLib
(
http://www.sharpziplib.com)
On Fri, 22 Sep 2006 14:36:55 GMT, "Garth Wells" <no****@nowhere.com>
wrote:
>What's the best way to .zip (compress) a file via vb.net?
Thanks
--
Alex Leblanc
Xceed Software Inc.