How to avoid “WindowsError: [Error 5] Access is denied”

后端 未结 7 1795
遥遥无期
遥遥无期 2020-12-06 05:12

There\'s the script to re-create folder:

# Remove folder (if exists) with all files
if os.path.isdir(str(os.path.realpath(\'..\') + \"\\\\my_folder\")):
             


        
7条回答
  •  星月不相逢
    2020-12-06 05:17

    It happens because you are not checking if you have permissions to open that path. You need to change the permissions on those folders.

提交回复
热议问题