[
  {
    "Id": "234155",
    "ThreadId": "68807",
    "Html": "<p>hi all,</p>\r\n<p>though you could help. i've been trying to extract files from a zip file. the structure of the zip file is</p>\r\n<p>sample.zip</p>\r\n<p>&nbsp;&nbsp;&nbsp; |--- directory1</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |--- file1.txt</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |--- file2.txt</p>\r\n<p>&nbsp;</p>\r\n<p>when extracted</p>\r\n<p>&nbsp;&nbsp;&nbsp; |--- directory1</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |--- file1.txt</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |--- file2.txt</p>\r\n<p>&nbsp;</p>\r\n<p>what i want to do is that when the zip file is extracted, the directory will not be among the extracted files. i've tried the code below</p>\r\n<p>&nbsp;</p>\r\n<p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">foreach</span> (ZipEntry z <span style=\"color:Blue\">in</span> zip1)\r\n     {\r\n          <span style=\"color:Blue\">if</span> (!z.IsDirectory)\r\n          {\r\n               z.Extract(targetDirectory, <span style=\"color:Blue\">false</span>);\r\n          }\r\n     }\r\n</pre>\r\n</div>\r\nbut this do not work. it automatically writes the directory1 among the extracted files. would be great if you guys could help me. thanks</p>",
    "PostedDate": "2009-09-13T20:51:19.493-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "234167",
    "ThreadId": "68807",
    "Html": "<p>Set the property ZipFile.<a href=\"http://dotnetzip.codeplex.com/Thread/html/4970c6e8-c169-3ecc-b5f2-8ba9b354c51d.htm\">FlattenFoldersOnExtract </a>&nbsp;, before calling ZipEntry.Extract();</p>\r\n<p>This property is available in v1.8.4.19 and later.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-09-13T22:11:45.93-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]