[
  {
    "Id": "150379",
    "ThreadId": "45096",
    "Html": "Hello,<br>\r\n<br>\r\nI have a scenario where I'm extracting a zip file into a directory and I don't want it to overwrite the preexisting files. I just want to extract the files that don't exist in the destination folder. Is this possible? Because before I was getting exceptions when I attempted this?<br>\r\n<br>\r\nThanks<br>\r\n-Blake Niemyjski\r\n",
    "PostedDate": "2009-01-23T12:42:51.31-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "150641",
    "ThreadId": "45096",
    "Html": "Hmmm, Blake, what you want sounds reasonable, but<br>\r\nit is currently not possible to do that with a single method call.  You can do it with some extra logic, though.<br>\r\n<br>\r\nIn the ZipEnty interface, for Extract() I think there are two options: either overwrite existing files, or throw an Exception when there is an attempt to extract onto an existing file.  <br>\r\nThere is currently no option to &quot;just quietly not extract&quot; files that already exist.  Therefore, the way to do what you want is to NOT try to Extract() when the file already exists. <br>\r\n<br>\r\nI can suggest that you do something like this: <br>\r\n<pre>  foreach (ZipEntry e in zip)\r\n  {\r\n     if (!e.IsDirectory)\r\n     {\r\n          if (!File.Exists(Path.Combine(ExtractDir,e.FileName)))\r\n          {\r\n              e.Extract(ExtractDir);\r\n          }\r\n     }\r\n  }\r\n</pre>\r\nIn english: enumerate through the entries in the zip file. Call Extract() on each entry only if the target file does not exist. <br>\r\n<br>\r\nI can imagine getting fancier, for example only extracting files if the file on disk is OLDER than the file in the archive. And so on. That is all left as an exercise for YOU. \r\n",
    "PostedDate": "2009-01-24T22:45:14.843-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "158961",
    "ThreadId": "45096",
    "Html": "Hello,<br>\r\n<br>\r\nThanks<br>\r\n<br>\r\nThanks<br>\r\n-Blake Niemyjski <br>\r\n<br>\r\n<br>\r\n<br>\r\n",
    "PostedDate": "2009-02-18T06:00:05.177-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]