Home > other >  Access denied python3.6 OS. The remove ()
Access denied python3.6 OS. The remove ()

Time:11-19

Little younger sister is a novice, the first to write a python program, realize the matching conditions after copying files and then delete files, but in the delete part always prompt access denied,

CodePudding user response:

Did the file open, or the file path is correct

CodePudding user response:

PermissionError, permission problems

CodePudding user response:

@ oyljerry file does not open, the file path from the parser returns is correct

CodePudding user response:

@ alby can you tell me how to solve?

CodePudding user response:

If the Windows operating system, the administrator with a way to open your IDE

CodePudding user response:

Must first have permission, another is if the folder below file exists, delete seems to fail

CodePudding user response:

I also encountered this problem today, and it is at the time of delete empty folder

CodePudding user response:

https://blog.csdn.net/weixin_41775301/article/details/90544852

CodePudding user response:

OS. The remove () can only delete a file
OS. The rmdir () can delete folders but it must be empty
  • Related