title: ASP.NET How do I wait for file upload/release?
body: <p>I've got ASP.NET intranet application written in VB. It gets a file from the user, and then depending on a few different cases it may create a few copies of the file as well as move the original.</p>
  
  <p>Unfortunately I've come across a case where I get this error:</p>
  
  <pre><code>Exception Details: System.IO.IOException: The process cannot access the file 
  '\\some\dir\D09_03_5_180_0.000-6.788.png' because it is being used by 
  another process.
  </code></pre>
  
  <p>Which is thrown by <code>My.Computer.FileSystem.CopyFile</code>. And that's fine that it's being used by another process - it may still be saving/downloading from the user or trying to copy while another thread(?) is copying, I don't really care about that, what I want to know:</p>
  
  <p>Is there any way that I can tell VB to wait to copy (also move) the file until the file is no longer in use?</p>
  
  <p>Thanks</p>