I have a function that get a ZIP file and extract it to a directory (I use DotNetZip library.)
public void ExtractFileToDirectory(string zipFileName, string
You can also use LINQ to select which entries you want to extract. For example:
using (var zip = ZipFile.Read(ArchiveToRead))
{
var selection = from e in zip.Entries
where System.IO.Path.GetFileName(e.FileName).StartsWith("C")
select e;
foreach (var e in selection)
e.Extract(extractDir);
}
Of course you can use whatever query criteria you want in the where
clause.