Search code examples
c#fileskipdotnetzip

DotNetZip get skipped files


Until recently I used DotNetZip v1.9.1.8 source code. It's neccessary to skip locked files throw set property

ZipErrorAction == ZipErrorAction.Skip

That's work fine, but I need to get list of all skipped files, so I changed the source code on my needs.

Now was made decision to use the last version of DotNetZip (1.9.8) throw nuget-package. But, naturally, it doesn't have such functional or maybe I don't find him.

Anyone encountered with such a task or know how to work around this without changing the source code?


Solution

  • Try to handle the ZipError event. You can use ZipEntry.FileName to get the file name.

    See http://dotnetzip.herobo.com/DNZHelp/html/df17bd70-71d9-0fca-a58d-b41455523c86.htm for more info.