title: How to get Write Access to a file/directory locked by another process - Powershell
body: <p>I've a powershell script which performs some operations on pdf files, email as attachments, then moves the files to an archive.
  Script worked properly for about 2 years, however recently I (and also the clients) started getting this error:</p>
  
  <pre><code>The process cannot access the file 'file_name' because it is being used by another process.
  </code></pre>
  
  <p>From following question I've determined how to check if a file/folder is locked,
  <a href="https://stackoverflow.com/questions/9394629/how-to-check-if-file-is-being-used-by-another-process-powershell">How to check if file is being used by another process - Powershell</a></p>
  
  <p><strong>My Question:</strong> 
  <br/>How can I get write access to some file or directory locked by another process?</p>
  
  <p>Thanks for your response.</p>