Ionic Zip Library v1.9.1.6
Extract Method (baseDirectory)
Extract the entry to the filesystem, starting at the specified base
directory.


- baseDirectory (String)
- the pathname of the base directory

Using this method, existing entries in the filesystem will not be overwritten. If you would like to force the overwrite of existing files, see the ExtractExistingFile property, or call Extract(String, ExtractExistingFileAction).
See the remarks on the LastModified property, for some details about how the last modified time of the created file is set.

This example extracts only the entries in a zip file that are .txt files,
into a directory called "textfiles".
CopyC#
CopyVB.NET

using (ZipFile zip = ZipFile.Read("PackedDocuments.zip")) { foreach (string s1 in zip.EntryFilenames) { if (s1.EndsWith(".txt")) { zip[s1].Extract("textfiles"); } } }

Using zip As ZipFile = ZipFile.Read("PackedDocuments.zip") Dim s1 As String For Each s1 In zip.EntryFilenames If s1.EndsWith(".txt") Then zip(s1).Extract("textfiles") End If Next End Using