Nov 30, 2011

How unzip a zip file?

To unzip also you can use the same Ionic.zip dll.

Example :-

void UnZip(string fileName)
{
     string targetDir = @"C:\Documents and Settings\admin\Desktop";
     using ZipFile unZip  = ZipFile.Read(fileName)
     {
          foreach ZipEntry  e in unZip
         {
              e.Extract(targetDir, ExtractExistingFileAction.OverwriteSilently);
         }
     }
}

1 comment:

Krishna Sanghi said...

How to delete a zip file ?