Udii

In my application multiple reports are generated and saved on server. I want to zip all these reports and keep a link on webpage so that user can download this zip. But I am not able to figure out a way to zip the files programatically..Please help me...thanks in advance..

Re: .NET Base Class Library How to Zip files within a folder?

boban.s

You can use free component SharpZipLib






Re: .NET Base Class Library How to Zip files within a folder?

Mark Dawson

Hi,

  if you are using .Net 2.0 or above you can use the System.IO.Compression.GZipStream to compress/decompress your data, see: http://msdn2.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx

 

Mark.






Re: .NET Base Class Library How to Zip files within a folder?

RizwanSharp

You can use http://www.icsharpcode.net/OpenSource/SharpZipLib/ free open source component for archiving and compressing multiple file into a single file compatible with Zip, Tar etc.

Best Regards,

Rizwan aka RizwanSharp






Re: .NET Base Class Library How to Zip files within a folder?

Udii

Hi guys, thanks for your reply...I got a way to do it...I first created a zip file and then copied all the reports in it...



Re: .NET Base Class Library How to Zip files within a folder?

Jeff Bazinet

I have written code to zip multiple files and entire folders and published the following article that may be helpful to you:

GZipStream, C# to Compress Folders and Multiple Files