[
  {
    "Id": "227034",
    "ThreadId": "66796",
    "Html": "<p>Hi to all. Great lib there!</p>\r\n<p>&nbsp;</p>\r\n<p>Is there any way that i can add file which is already in use in my zip archive. I am using VB .net (VS 2008).</p>\r\n<p>&nbsp;</p>\r\n<p>Best regards!</p>",
    "PostedDate": "2009-08-24T06:38:37.813-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "227168",
    "ThreadId": "66796",
    "Html": "<p>I'm sorry, I don't understand what you mean. Maybe you could elaborate a little.</p>",
    "PostedDate": "2009-08-24T11:32:45.223-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "227236",
    "ThreadId": "66796",
    "Html": "<p>Sorry, I was in rush.</p>\r\n<p>&nbsp;</p>\r\n<p>I wont to zip a file while it is being used by another process. To be more precise, when I try to zip a *.dbf file while a db connection is open, I am getting this exception: &quot;The process cannot access the file 'C:\\Documents and Settings\\...\\JK06.DBF' because it is being used by another process.&quot;</p>\r\n<p>&nbsp;</p>\r\n<p>It is imposible to terminate proceses that occupeng the file before archiving, so I need to find another solution.</p>",
    "PostedDate": "2009-08-24T15:06:00.383-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "227240",
    "ThreadId": "66796",
    "Html": "<p>Right,</p>\r\n<p>well that's a <span style=\"text-decoration:line-through\">oracle</span> database file, and it's locked because the dB server is writing to it.&nbsp; Zipping it, or reading it, is a bad idea, which is why you get the exception.</p>\r\n<p>Your options are:</p>\r\n<ul>\r\n<li>skip the file</li>\r\n<li>shut down database server, and then zip it. </li>\r\n</ul>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-24T15:28:20.597-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "227362",
    "ThreadId": "66796",
    "Html": "<p>It's not oracle, its a Clipper database file. As I sad, terminating connection or shuting down related application is not an option.</p>",
    "PostedDate": "2009-08-25T00:55:03.183-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "227585",
    "ThreadId": "66796",
    "Html": "<p>ok, I've posted a new update of DotNetZip, v1.8.4.22 .</p>\r\n<p>There is now a new property on the ZipFile class, called ZipErrorAction.&nbsp; Use it to specify what you want to do, in the event the DotNetZip library encounters an IO error (such as the one you saw, &quot;The process cannot access the file 'C:\\Documents and Settings\\...\\JK06.DBF' because it is being used by another process.&quot;).&nbsp; You can specify:</p>\r\n<ul>\r\n<li>Skip the file</li>\r\n<li>Retry</li>\r\n<li>Throw (which is what it did previously)</li>\r\n<li>InvokeErrorEvent</li>\r\n</ul>\r\n<p>The last option invokes an event handler that you provide.&nbsp; You can use this to prompt the user, for example, to ask what they want to do.&nbsp;</p>\r\n<p>The new event handler is ZipFile.ZipError.&nbsp;</p>\r\n<p>At the very least this should provide a simple way for you to skip files that cannot be opened or read.</p>\r\n<p>Let me know what you think.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-25T11:45:04.96-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "227925",
    "ThreadId": "66796",
    "Html": "<p>I'll do a report as soun as I try. This 'retry' mode seams like will do the job.</p>\r\n<p>Regards!</p>",
    "PostedDate": "2009-08-26T06:05:20.91-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "228024",
    "ThreadId": "66796",
    "Html": "<p>As I thought, 'retry' works like charm. I soppose that lib periodicly check is it file in use and do archiving if not. That was my last planed solution too. But this way is much easier.</p>\r\n<p>I don't know is it bug or something else, but when I call ExtractAll method I got the worning in VS 2008. It says: Warning\t1\t'Public Sub ExtractAll(path As String, wantOverwrite As Boolean)' is obsolete: 'Please use property ExtractExistingFile to specify overwrite behavior)'</p>\r\n<p>That wosn't isue in previus version. &nbsp;But, regarding that is working without single error (tested on 4 computers) it is not a problem.</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks for intercession, Chesso!</p>",
    "PostedDate": "2009-08-26T09:36:11.007-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "228029",
    "ThreadId": "66796",
    "Html": "<p>Glad it's working.</p>\r\n<p>The ExtractAll method that accepts a Boolean will be removed in the next version of the library.&nbsp; You should use the simpler overload of ExtractAll, the one that accepts a single string.&nbsp; And specify the behavior you want for existing files, in the property called ExtractExistingFile, available on the ZipFile instance.</p>",
    "PostedDate": "2009-08-26T09:47:25.953-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]