[
  {
    "Id": "955983",
    "ThreadId": "406748",
    "Html": "\r\n<p>I'm trying to Extract only the image files in the existing .zip file in MVC3 Project.</p>\r\n<p>Here is what i have done so far to get it</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<pre>string zipToUnpack = @&quot;C:\\Users\\Public\\Pictures\\Sample Pictures\\images.zip&quot;;\r\n            string unpackDirectory = System.IO.Path.GetTempPath();\r\n            \r\n            using (ZipFile zip1 = ZipFile.Read(zipToUnpack))\r\n            {\r\n                // here, we extract every entry, but we could extract conditionally\r\n                // based on entry name, size, date, checkbox status, etc.  \r\n                var collections = zip1.SelectEntries(&quot;name=*.jpg;*.jpeg;*.png;*.gif;&quot;);\r\n               \r\n                foreach (var item in collections)\r\n                {\r\n                    item.Extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently);\r\n                }\r\n            }</pre>\r\n<pre><br></pre>\r\n<pre>I tried debugging my code. I've found that <strong>collections</strong> has <strong>0</strong> elements.</pre>\r\n<pre>If i give only one extension, then it works well and good.</pre>\r\n<pre><br></pre>\r\n<pre>I need to extract all the image formats from .zip file</pre>\r\n<pre><br></pre>\r\n<pre>Can anyone please sort out this issue.</pre>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2012-12-14T01:30:56.813-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]