Directory Rename Exception in C#
<p>When I try to rename a Directory using the following code:</p>

<pre><code>  try
  {
        System.IO.Directory.Move(oldPath, newPath);
  }
  catch (System.IO.IOException e2)
  {
        Console.WriteLine(e2.Message);
  }
</code></pre>

<p>I get the following exception: The process cannot access the file because it is being used by another process.</p>

<ol>
<li>I don't understand why it says "file" in the first place.</li>
<li>Also, the directory is empty. What file is it referring to?</li>
<li>Lastly, how to manage to rename the Directory without any exceptions?</li>
</ol>

<p><strong>UPDATE:</strong> I guess I found the reason for the exception, it is because I am trying to rename the file/folder names of files/folders situated in the Google Drive. The Google Drive application is the other process using it! Any solutions to rename a folder in the Google Drive? But the weird thing is that I don't get this exception when I try to rename files located in the Google Drive through C#.</p>

<p>Thanks! </p>
