I have this simple python script;
def scanFolder(path="."):
foldersList = []
for name in os.listdir(path):
if os.path.isdir(name):
for innerName in os.listdir(name):
if os.path.isdir(innerName):
foldersLIst.append(innerName)
when run this script i get this error message:
Traceback (most recent call last):
File "upNew.py", line 42, in <module>
File "upNew.py", line 18, in __init__
scanFolder(path=".")
File "upNew.py", line 24, in scanFolder
for innerName in os.listdir(name):
PermissionError: [WinError 5] Access is denied: 'System Volume Information\\*.*'
How can i solve this? I'm on Windows 7, using python 3.3
except PermissionErrorthanexcept IOError as e: if e.errno != ...: raise.