[
  {
    "Id": "274696",
    "ThreadId": "80156",
    "Html": "<p>Hi,</p>\r\n<p>&nbsp;</p>\r\n<p>I am currently running into an awkward situation: after I extract the zip file (multivolume) I cannot delete the source zip files. This works great with saving, after which I move the resulting zip files from the temp folder to the desired target.</p>\r\n<p>&nbsp;</p>\r\n<p>The code I'm using is as follows:</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">public</span> <span style=\"color:Blue\">void</span> UnZipFiles(<span style=\"color:Blue\">string</span> zipPathAndFile, <span style=\"color:Blue\">string</span> outputFolder)\r\n{\r\n<span style=\"color:Blue\">using</span> (ZipFile zip = ZipFile.Read(zipPathAndFile))\r\n            {\r\n                <span style=\"color:Blue\">foreach</span> (ZipEntry e <span style=\"color:Blue\">in</span> zip)\r\n                {\r\n                    e.Extract(outputFolder,ExtractExistingFileAction.OverwriteSilently);\r\n                }<br>&nbsp;}\r\n        }\r\n<br>The goal is to zip a huge file, send it to the server in small pieces and then unzip it on the server. <br><br>After the unziping I'm moving the resulting files and cleaning up the zip files to save space. <br><br>Its the last step that is failing. I'm deleting with Directory.Delete(target,true).<br><br>Is this some kind of bug in DotNetZip or am I missing something?<br><br>Besides this small issue all is working great.<br><br>Thank you very much. <br><br>Edit: I'm using Ionic.Zip.dll version 1.9.0.37</pre>\r\n</div>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-01-08T02:21:19.78-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "274768",
    "ThreadId": "80156",
    "Html": "<p>Well, it might be a bug in DotNetZip, but I have no way to know.</p>\r\n<p>You didn't say why the Delete is failing.&nbsp; Normally there's an exception, indicating the reason it failed.&nbsp; If it's a problem with permissions, then you'll get a message to that effect. IF the problem is that the file to be deleted is still open, you'd get a message indicating <em>that</em>.&nbsp;&nbsp; I might be able to help diagnose if you provided the exception and stacktrace.</p>\r\n<p>In theory it could be that the file is still being held open by DotNetZip, preventing the delete.&nbsp;&nbsp;But I think that is unlikely.&nbsp;&nbsp;&nbsp;</p>\r\n<p>If I were troubleshooting this, I might see if it is possible to create the zip and then delete it, without unzipping in between.&nbsp; If you factor out the unzipping, and it can be deleted, then it points to DotNetZip as the cause.&nbsp; If you remove the unzipping, and it still cannot be deleted, then it would indicate that it is not DotNetZip.&nbsp; This wouldn't be definite, but it would be a good indication, one way or the other.</p>\r\n<p>good luck</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-01-08T06:10:26.107-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "506438",
    "ThreadId": "80156",
    "Html": "<p>I had exactly the same problem. After extracting the files in a zip, I tried to manually delete the files but the system complains that the file is still being used by another process.</p>\r\n<p>I tried all the sample code proposed on the posts but nothing works. The zip file itself can be deleted but not the extracted files. Can anyone help?</p>",
    "PostedDate": "2010-10-12T23:53:23.603-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "506509",
    "ThreadId": "80156",
    "Html": "<p>I have the same problem.</p>\r\n<p>The Zip file can't be deleted after it is being extracted (only if the zip file is composed of several segments).</p>\r\n<p>when i don't extract the zip file , i can delete it successfully.</p>",
    "PostedDate": "2010-10-13T02:43:08.49-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "507434",
    "ThreadId": "80156",
    "Html": "<p>You two are NOT describing the same problem.&nbsp; You both are having trouble deleting files, but not the same files. The former is having trouble deleting EXTRACTED files.&nbsp; The latter is having trouble deleting the zip file from which files were extracted.&nbsp; Both of these are independent of the prior discussion, from January.&nbsp;</p>\r\n<p>I suggest you each open unique threads to discuss and investigate your unique situations.</p>\r\n<p>If I try to reply to all of you on one thread, none of us will be clear on what is being asked, and what is being answered.</p>\r\n<p>Thanks</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-10-14T14:04:29.383-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]