the fact that it fails shoul be due to some windows restriction about trash & some hidden files, <br>to bypass that you can add a filter in here <br><br>def walk(dir):<br>
for name in os.listdir(dir):<br> #the following line is the filter<br> if name != 'Trash can' or name != 'some hidden directory name':<br>
path = os.path.join(dir,name)<br>
if os.path.isfile(path):<br> .....<br> else: <br> pass<br>