title: Can't remove a folder with os.remove (WindowsError: [Error 5] Access is denied: 'c:/temp/New Folder')
body: <p>I'm working on a test case for which I create some subdirs. However, I don't seem to have the permission to remove them anymore. My UA is an Administrator account (Windows XP).</p>
  
  <p>I first tried:</p>
  
  <pre><code>folder="c:/temp/" 
  for dir in os.listdir(folder): 
      os.remove(folder+dir)
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>folder="c:/temp/" 
  os.remove(folder+"New Folder")
  </code></pre>
  
  <p>because I'm sure "New Folder" is empty. However, in all cases I get:</p>
  
  <pre><code>Traceback (most recent call last): 
    File "&lt;string&gt;", line 3, in &lt;module&gt; 
  WindowsError: [Error 5] Access is denied: 'c:/temp/New Folder'
  </code></pre>
  
  <p>Does anybody know what's going wrong?</p>