[
  {
    "Id": "525590",
    "ThreadId": "235656",
    "Html": "\r\n<p>Hi</p>\r\n<p>I'm using Ionic.zip&nbsp; ver 1.9.1.5 with vb.net 2008</p>\r\n<p>If I create a zip using&nbsp;&nbsp;&nbsp; zip1.UseZip64WhenSaving =Zip64Option.none&nbsp; then I everything is god and I can delete the resultant zip file.</p>\r\n<p>However if make a zip using&nbsp;&nbsp;&nbsp; zip1.UseZip64WhenSaving =Zip64Option.always&nbsp;&nbsp; then I can not&nbsp; delete the resultant zip.&nbsp; Windows states the zip file is in use by another process, even after a reboot.</p>\r\n<p>&nbsp;</p>\r\n<p>My code is -</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Using zip1 As ZipFile = New ZipFile<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.CompressionLevel = My.Settings.ZipLevel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n ' Ionic.Zlib.CompressionLevel.Level6<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.UseZip64WhenSaving = My.Settings.Zip64Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Ionic.Zip.Zip64Option.Always<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.AddDirectory(bufferFilesFolder)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me._entriesToZip = zip1.EntryFileNames.Count<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.SetProgressBars()<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddHandler zip1.SaveProgress, New EventHandler(Of SaveProgressEventArgs)(AddressOf Me.zip1_SaveProgress)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.Save(bufferFolder &amp; ZipName)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Using</p>\r\n<p>&nbsp;</p>\r\n<p>Am I doing something wrong or have I found a bug?</p>\r\n<p>How do you get rid of the faulty zip?&nbsp; can't rename it but can copy it. The copy can not be deleted either. Can not add or delete any contents of the zip but can restore it.</p>\r\n<p>Now have a hard drive full of test zips that I can't kill off...</p>\r\n<p>&nbsp;</p>\r\n<p>Regards</p>\r\n<p>malcom</p>\r\n",
    "PostedDate": "2010-11-22T16:13:51.337-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "525616",
    "ThreadId": "235656",
    "Html": "\r\n<p>I don't know; maybe you have an anti-virus program that is holding the file open.&nbsp; It's very unusual that you cannot delete the files even after a reboot, unless some process immediately opens it.&nbsp; Which makes me think of an anti-virus program.&nbsp;\r\n It's possible that the AV program doesn't know how to properly read zip64 files, which causes the file to stay open.&nbsp; I'm just guessing here.</p>\r\n<p>If you get the sysinternals tools, there's a <a href=\"http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx\">\r\nhandle</a> tool that lists the files that are open by all processes in the operating system. This may tell you what is holding the file open, preventing it from being deleted.</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-11-22T17:51:05.033-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "525620",
    "ThreadId": "235656",
    "Html": "\r\n<p>Thanks Cheeso,</p>\r\n<p>I had a look at the Handles tool with interesting results. It reports that only 'explorer' has handles to any of&nbsp; these dud zip files.</p>\r\n<p>The only explorer instance is that of the Windows (XP) gui. If I kill that process then I can delete the dud zip via the command line.</p>\r\n<p>&nbsp;</p>\r\n<p>This only occurs with zip64 enabled and is regardless of file sizes or quantity.</p>\r\n<p>If I copy the dud zip file to another pc, I can't delete it from there either.</p>\r\n<p>There is something very different about these files in that Explorer is holding onto them...&nbsp; Any clues</p>\r\n<p>&nbsp;</p>\r\n<p>I noticed you also have a ionic.tar compressor. If I can't use zip64 then I might look at TAR.&nbsp; Can you tell me what the limits are for TAR files? I need way more than 4.2Gb, more like 20Gb.</p>\r\n<p>Is all this Ionic stuff your work? Bloody good effort.</p>\r\n<p>&nbsp;</p>\r\n<p>cheers</p>\r\n<p>malcom</p>\r\n",
    "PostedDate": "2010-11-22T18:24:31.083-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "525632",
    "ThreadId": "235656",
    "Html": "\r\n<p>Hmm, yep, could be that explorer for some reason wants to read that file, can't, and then keeps trying.&nbsp; ?? odd.&nbsp; I can't imagine why that would be.</p>\r\n<p>I have a test suite developed for DotNetZip and I run it with every binary release.&nbsp; It creates hundreds of zip64 files, and deletes them when it's finished.&nbsp; This most recently ran on a computer running Vista SP1.&nbsp; Never had a problem with\r\n Explorer.&nbsp; I don't believe I ever ran the test suite on Windows XP.</p>\r\n<p>Do you by chance have another zip tool installed on your computer?&nbsp; Something that adds an Explorer extension, that might try to read every zip file it finds? Just an idea.&nbsp; Maybe it's an explorer extension.</p>\r\n<p>About the tar thing - yes that is also my work.&nbsp; Tar&#43;GZip It's probably better for you if you have many many files.&nbsp; The compression gets better when you compress large streams.&nbsp; If the files you are compressing are already large, then there's\r\n not going to be a large difference in compression between ZIP and tar&#43;gzip. The other distinguishing factor is usually that zip files can be read by various tools, and tar/gz files require &quot;less popular&quot; tools, which means they're harder to share.&nbsp; But\r\n in your case you're talking about zip64, which honestly, isn't widely supported, so a file formatted that way will not be shareable anyway.&nbsp; Tar&#43;GZ will be more easy to share than zip64, I think.</p>\r\n<p>anyway good luck figuring this all out.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-11-22T18:57:50.41-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "525636",
    "ThreadId": "235656",
    "Html": "\r\n<p>Thanks Mate</p>\r\n<p>&nbsp;</p>\r\n<p>I think TAR is the go then.</p>\r\n<p>This a Windows app that feels out into an OSX network, archives a heap of large graphics files and moves them off to data tapes. If ever they are restored, it will be on a Mac so Tar is a more obvious solution. Files are typically 1-2Gb.</p>\r\n<p>FYI Stuffit for Mac reads zip64 nicely</p>\r\n<p>&nbsp;</p>\r\n<p>You could be onto something with the zip tools. I think all machines have Zipgenius installed as well so thats worth investigating although I'd expect that to lock standard zips as well as 64's.</p>\r\n<p>I'll let you know what transpires but I think Tar is the eventual solution.</p>\r\n<p>&nbsp;</p>\r\n<p>many thanks, love your work.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-11-22T19:07:14.743-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "526089",
    "ThreadId": "235656",
    "Html": "\r\n<p>In case someone else has a similar problem, ZipGenius (http://www.zipgenius.com/) is the problem.</p>\r\n<p>Uninstalling this removed all problems. For some reason it opens handles to (only) zip64 files at boot up preventing their deletion. Non zip64 files are ok.</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks for your help Cheeso</p>\r\n",
    "PostedDate": "2010-11-23T13:31:38.27-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "526533",
    "ThreadId": "235656",
    "Html": "\r\n<p>Glad you worked it out Malcomm, and thanks for the compliments.</p>\r\n<p>good luck.</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-11-24T09:30:47.423-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]