[
  {
    "Id": "446675",
    "ThreadId": "213650",
    "Html": "<p>Hello, can I extract my zip files into another directory wich is not the same as I saved it ?</p>\r\n<p>This is the directory structure saved into file.zip</p>\r\n<p>&nbsp;</p>\r\n<pre>FILE.ZIP\r\n--&gt; dir A\r\n   --&gt; sub dir A\r\n      --&gt; file.txt\r\n<br>I want save file.txt into this sample directories structure :  <br><pre>directory_C\r\n   --&gt; file.txt\r\n</pre>\r\nIf use e.Extract(targetDir, ExtractExistingFileAction.OverwriteSilently)<br>passing directory_C as targetDir the final result is :  <br><br>\r\n<pre>directory_C \r\n  --&gt; dir A \r\n     --&gt; sub dir A \r\n        --&gt; file.txt </pre>\r\n<br>It's wrong for my use. Can you help me ?  <br><br>Many Thank's  <br>Claudio</pre>",
    "PostedDate": "2010-05-24T08:24:04.863-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "446687",
    "ThreadId": "213650",
    "Html": "<p>yes. Rename the entry before calling Extract.</p>\r\n<div style=\"border:solid .1em #ccc;color:black;background-color:white;margin:.25em 0.5em 0 0.5em;padding:0.25em 1.75em 0.25em 1.25em\">\r\n<pre>e.FileName = &quot;directory_C\\file.txt&quot;;\r\ne.Extract(targetDir);\r\n</pre>\r\n</div>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-05-24T08:56:32.207-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "446969",
    "ThreadId": "213650",
    "Html": "<p>Thank you for your reply but giving an error :</p>\r\n<p>&nbsp;</p>\r\n<pre> foreach (ZipEntry e in zip)\r\n\r\n                    {\r\n                        // http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=213650\r\n                        FileInfo f = new FileInfo(e.FileName);\r\n                        e.FileName = Path.Combine(targetDir, f.Name);\r\n\r\n                        e.Extract(targetDir, ExtractExistingFileAction.OverwriteSilently);\r\n                        logger.Trace(&quot;File {0} successfull unzipped on {1}&quot;, fileZipName, targetDir);\r\n                    }\r\n\r\n</pre>\r\n<p>If I modify the filename into zip collection I have this error:<br>failed: <code>System.ApplicationException : Collection was modified; enumeration operation may not execute.</code></p>\r\n<p>Any other help ?</p>\r\n<p>Bye, Claudio</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-05-25T01:20:44.597-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "447467",
    "ThreadId": "213650",
    "Html": "<p>I read many many post ... :o(</p>\r\n<p>there is same issue on :</p>\r\n<p><span id=\"ctl00_ctl00_MasterContent_Content_PostRepeater_ctl14_Timestamp\">Aug 2009&nbsp;&nbsp;&nbsp; </span>http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=83773</p>\r\n<p>Feb  2009&nbsp;&nbsp;&nbsp; http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=83773</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-05-26T00:54:14.96-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "447525",
    "ThreadId": "213650",
    "Html": "<p>I need the required feature.</p>\r\n<p>I can't use Rename the entry before calling Extract. because it throw an exception &quot;collection was modified&quot;.</p>\r\n<p>I switched now on http://sevenzipsharp.codeplex.com/</p>\r\n<p>Simply settings false to PreserveDirectoryStructure flag I obtained my result correct.</p>\r\n<p>Than you all, bye</p>\r\n<p>Claudio</p>",
    "PostedDate": "2010-05-26T03:26:28.323-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "447557",
    "ThreadId": "213650",
    "Html": "Instead of \r\n       foreach (ZipEntry e in zip)\r\n\r\nTry\r\n      foreach (ZipEntry e in zip.EntriesSorted)\r\n\r\nThis is what I used as a workaround and it works great. Didn't need to change any other line of code.\r\n",
    "PostedDate": "2010-05-26T04:35:03.99-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "447672",
    "ThreadId": "213650",
    "Html": "<p>John,</p>\r\n<p>it run perfectly,</p>\r\n<p>thank you very mutch.</p>\r\n<p>Claudio</p>",
    "PostedDate": "2010-05-26T07:58:08.693-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]