[
  {
    "Id": "905993",
    "ThreadId": "393645",
    "Html": "\r\n<p>VERSION: 1.9.1.8<br>\r\n<br>\r\nWhen I extract the files in a zip archive to a destination directory where some of those files may already exist I get this error.<br>\r\n<br>\r\n[CLASSNAME] threw exception: <br>\r\nSystem.IO.IOException: The file [FILENAME] already exists.</p>\r\n<p>The component that is responsible for zipping/unzipping files is separated into 2 files.<br>\r\n<br>\r\nZip and ZipHelper<br>\r\n<br>\r\n</p>\r\n<pre>public class Zip\r\n{\r\n   string zipPath = &quot;aPath&quot;;\r\n   public bool Decompress(string destinationPath)\r\n        {\r\n\r\n           ZipHelper helper = new ZipHelper(zipPath);\r\n           using (_zipDm.Open())\r\n           {\r\n               _zipDm.ExtractAll(destinationPath);\r\n           }\r\n        }\r\n}\r\n\r\npublic class ZipHelper\r\n{\r\n  string Path{get;set;}\r\n  ZipFile _zip;\r\n  public ZipHelper(string path)\r\n  {\r\n    this.Path = path;\r\n  }\r\n public void ExtractAll(string destinationPath)\r\n {     <br>    _zip.ExtractAll(destinationPath,ExtractExistingFileAction.OverwriteSilently);\r\n }\r\npublic IDisposable Open()\r\n {\r\n     _zip = new ZipFile(this.Path);\r\n     return _zip;\r\n }\r\n\r\n}</pre>\r\n<br>\r\nDocumentation says<br>\r\n&quot;This property has no effect when extracting to a stream, or when the file to be extracted does not already exist.&quot;\r\n<p></p>\r\n<p>But I am not passing a stream I am passing a string to the extract all method.<br>\r\n<br>\r\nI have also tried using the Read() method and using a forloop to call the Extract method for each individual Entry.\r\n<br>\r\n<br>\r\nPlease Help me.</p>\r\n",
    "PostedDate": "2012-08-29T15:21:17.81-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]