[
  {
    "Id": "170278",
    "ThreadId": "50790",
    "Html": "This is probably way easier than I am making it, but it is not working.&nbsp; I have a zip, say named &quot;MyArchive.zip&quot; and in the zip is a directory called &quot;install&quot; and in the directory is a file called &quot;MyFile.ini&quot; and I simply want to extract that file.&nbsp; I have no problem getting the file if it is not in a sub directory using something like this:<br>\r\n<br>\r\nusing (ZipFile zip = ZipFile.Read(&quot;C:\\\\MyArchive.zip&quot;))<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip.Extract(&quot;MyFile.ini&quot;, &quot;C:\\\\&quot;, true);<br>\r\n<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>\r\n<br>\r\nBut, if I try to get it out of the sub directory it fails:<br>\r\n<br>\r\nusing (ZipFile zip = ZipFile.Read(&quot;C:\\\\MyArchive.zip&quot;))<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip.Extract(&quot;\\\\install\\\\MyFile.ini&quot;, &quot;C:\\\\&quot;, true);<br>\r\n<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>\r\n<br>\r\nI am sure it it user error but can someone enlighten me?<br>\r\n<br>\r\nThanks.<br>\r\n",
    "PostedDate": "2009-03-20T10:47:48.547-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "170445",
    "ThreadId": "50790",
    "Html": "I figured it out, I guess, but I am not sure if what I am seeing is the desired results.&nbsp; It seems that when I extract a file from a sub directory of a zip file that the DotNetZip library automatically creates a directory with the same name in the specified extraction location, therefore, given my example above, &quot;MyFile.ini&quot; is not actually extracted to &quot;C:\\&quot; rather it is extracted to &quot;C:\\install&quot;&nbsp; While I can certainly live with this, I am not sure this should be the default behavior and I cannot find any information in the help file one it either. <br>\r\n",
    "PostedDate": "2009-03-21T17:04:14.617-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "170479",
    "ThreadId": "50790",
    "Html": "Ah, yes - what you observed is the expected behavior. <br>\r\nI will make the documentation clearer on that. <br>\r\n",
    "PostedDate": "2009-03-21T22:03:05.413-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]