HOW TO extract only specific files from a .ZIP using C#

"Well, it's better to be silent than to be a fool." - Harper Lee

Online Forums are a great place to learn new tricks.

I learnt today that DotNetZip is an open source class library and toolset for manipulating zip files or folders that's easier to use than the other popular library SharpZipLib. Built by Dino Chiesa, it is hosted on CodePlex and has extensive documentation & samples. It takes just a few lines & the ZipFile.ExtractSelectedEntries Method to filter specific files from a zipped file using a selection criteria expression.

Talking of  open source compression\decompression Libraries, there is yet another Library on SourceForge that has been immensely popular - 7-Zip. The code is available in C++ for whoever wants to tinker. Like 7-Zip, there is a ready to use WinForms sample app based on DotNetZip which can be a free replacement for the commercial WinZip utility.

Rant: At a lot of places in CodePlex, like the Issue Tracker & Reviews sections of a project, the year part is not shown for timestamps of posts. If you are tracking a discussion thread, viewing the date is meaningless without the year. If you feel strongly about this issue with CodePlex like I do, please vote it up so that it gets addressed faster. 

Also see:
Regular Expression to negate non-matching characters
Enclose email attachment as text in the body


200