[
  {
    "Id": "202957",
    "ThreadId": "59956",
    "Html": "<p>Can the error message &quot;The process cannot access the file because another process has locked a portion of the file.&quot; be changed to include the filename?</p>\r\n<p>i.e.- The process cannot access the file &lt;filename.123&gt; because another process has locked a portion of the file.&quot;</p>\r\n<p>I guess if there was a way to know the file that is unaccessible it can help troubleshoot.</p>",
    "PostedDate": "2009-06-18T07:59:01.773-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203097",
    "ThreadId": "59956",
    "Html": "<p>Yes, I'm changing the error message&nbsp;to document this.</p>\r\n<p>The original error message - &quot;The process cannot access the file because another process has locked a portion of the file.&quot;&nbsp; - is something that comes from Windows.&nbsp; I will add to that message, the filename and offset.</p>",
    "PostedDate": "2009-06-18T13:54:09.167-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203322",
    "ThreadId": "59956",
    "Html": "<p>Does 1.8.3.29 included this error message change?</p>",
    "PostedDate": "2009-06-19T05:56:21.713-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203341",
    "ThreadId": "59956",
    "Html": "<p>yes.</p>",
    "PostedDate": "2009-06-19T07:07:09.927-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203455",
    "ThreadId": "59956",
    "Html": "<p>Works like a charm.</p>",
    "PostedDate": "2009-06-19T11:18:51.117-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203500",
    "ThreadId": "59956",
    "Html": "<p>Hey Jeff, have you gotten this error?&nbsp; &quot;The process cannot access the file because another process has locked a portion of the file.&quot;&nbsp; ?</p>\r\n<p>What file?</p>\r\n<p>And when you say &quot;works like a charm&quot; - what results do you get with 1.8.3.29?&nbsp;&nbsp;</p>",
    "PostedDate": "2009-06-19T13:02:58.44-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203505",
    "ThreadId": "59956",
    "Html": "<p>I suppose I could have been more clear! :)</p>\r\n<p>I deliberately&nbsp;deleted a file from the directory after the initial processing of the directory but before it could be archived so I could see the error message. I have error messages and stack trace going to a log file in the root of C. An example:</p>\r\n<p>6/19/2009 4:07:44 PM<br>Could not find file 'C:\\Users\\jeffy.SELLETHICS\\Documents\\A_Demo.pst'.<br>&nbsp;&nbsp; at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br>&nbsp;&nbsp; at System.IO.FileInfo.get_Length()<br>&nbsp;&nbsp; at Ionic.Zip.ZipEntry.FigureCompressionMethodForWriting(Int32 cycle)<br>&nbsp;&nbsp; at Ionic.Zip.ZipEntry.WriteHeader(Stream s, Int32 cycle)<br>&nbsp;&nbsp; at Ionic.Zip.ZipEntry.Write(Stream s)<br>&nbsp;&nbsp; at Ionic.Zip.ZipFile.Save()<br>&nbsp;&nbsp; at Ionic.Zip.ZipFile.Save(String zipFileName)<br>&nbsp;&nbsp; at SMG_Backup.MainForm.ZipSave(String SourceFolder, String DestFile)</p>\r\n<p>As you can see, it tells me which file it had issue with. This is significant to me as it helps troubleshoot more specifically if there is an issue.</p>",
    "PostedDate": "2009-06-19T13:10:44.607-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "203580",
    "ThreadId": "59956",
    "Html": "<p>ok, I See.&nbsp; now some more info for you.&nbsp; The error in question, with the specific error message, &quot;The process cannot access the file because another process has locked a portion of the file.&quot;&nbsp; - is something that comes from Windows when another process locks a portion of the file.&nbsp;&nbsp; What you did was not the same.&nbsp; It produced an error condition, but a different one than what we were discussing.&nbsp;</p>\r\n<p>The way to lock a portion of a file in .NET is to call <a href=\"http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.filesystem.lock.aspx\">FileSystem.Lock</a> on the file.&nbsp;&nbsp; If you want to reproduce the error in question, rather than delete the file, take a lock on a portion of the file, with that API.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-06-19T19:26:42.12-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]