.Zip File

  • Thread starter Thread starter Garth Wells
  • Start date Start date
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)
 
Sorry, that was 1 line of C# code. The VB.NET code would be:

QuickZip.Zip( "d:\test.zip", True, True, False, "d:\file.txt" )
 
Back
Top