Answer the question
In order to leave comments, you need to log in
How to exclude folders to which the user does not have access Python os?
There is a function that iterates over directories and in the process stumbles upon such as C:\$Recycle.Bin\ . os.access() outputs True for each flag, but if you pass this path to os.listdir() it gives an error (PermissionError: [WinError 5] Permission denied) How to exclude such directories in Python?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question