title: IOException access denied when Directory.Move subfolder and parent folder
body: <p>I am trying to rename multiple folders that have subfolders, but when I use Directory.Move() on a subfolder the parent folder seem to get locked up. </p>
  
  <p>My code:</p>
  
  <pre><code>var pathParent = @"D:\test\f1";
  var pathSub = @"D:\test\f1\f2";
  
  var pathParentnew = @"D:\test\f1new";
  var pathSubnew = @"D:\test\f1\f2new";
  
  Directory.Move(pathSub, pathSubnew);
  Directory.Move(pathParent, pathParentnew);
  </code></pre>
  
  <p>The last <code>Directory.Move(</code>) throws an </p>
  
  <blockquote>
    <p>IOException: Access to "D:\test\f1" is denied</p>
  </blockquote>
  
  <p>Does anyone know how I can rename both folders?</p>