Extract . zip with status

Asked

Viewed 209 times

1

How to extair . zip files in a way that I can see the status of the items being extracted.

Ex:

static string GetStatus() { return "Extraindo... " + current_arquivo; }

Using Ionic.Zip’s Opensource system Ionic.Zip in codeplex

1 answer

1

I think you can use it this way:
Inside the Foreach you Will Have Each File..

private void MyExtract()
{
  string zipToUnpack = "C1P3SML.zip";
  string unpackDirectory = "Extracted Files";
  using (ZipFile zip1 = ZipFile.Read(zipToUnpack))
  {
      // here, we extract every entry, but we could extract conditionally
      // based on entry name, size, date, checkbox status, etc.  
      foreach (ZipEntry e in zip1)
      {
        e.Extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently);
      }
   }
}

Clicking More References

Browser other questions tagged

You are not signed in. Login or sign up in order to post.