title: I can't delete a folder that I just extracted from a zip file in python
body: <p>So here's my problem. I have a python script that takes a zipfile and extracts its contents. Then based on some constraint, I will try to delete the folder whose contents were just extracted. For some reason I get an error, WindowsError: [Error 5] Access is denied: 'Foldername' when i try to delete that folder. The simple code looks like the following</p>
  
  <p>wzip = zipfile.ZipFile('zipfile.zip')</p>
  
  <p>wzip.extractall()</p>
  
  <p>wzip.close()</p>
  
  <p>os.remove('ExtractedFolder')</p>
  
  <p>If I run this in the interpreter I get the following:</p>
  
  <p>Traceback (most recent call last):
    File "", line 1, in 
  WindowsError: [Error 5] Access is denied: 'ExtractedFolder'</p>
  
  <p>I'm using Python 2.6 on Windows Vista 32-bit and I'm kinda baffled as to why this might be happening.</p>