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).
I first tried:
folder="c:/temp/"
for dir in os.listdir(folder):
os.remove(folder+dir)
and then
folder="c:/temp/"
os.remove(folder+"New Folder")
because I'm sure "New Folder" is empty. However, in all cases I get:
Traceback (most recent call last):
File "<string>", line 3, in <module>
WindowsError: [Error 5] Access is denied: 'c:/temp/New Folder'
Does anybody know what's going wrong?