I have a problem with os.walk(path). Some folders seems that cannot Traversed. I have tried the os.path.exists(path)
but i have an exception even thought the directory already exists. From documentation is written that On some platforms, this function may return False if permission is not granted to execute os.stat()
on the requested file, even if the path physically exists.
So i have tried os.stat(path) and i get an error The system cannot find the file specified.
Finally i have tried os.listdir(path)
and i get a False message. so i have tried to do the following x=os.listdir("C:\\Windows\\System32")
but the folder v1 wasn't inside the list x when i have searched with the "v1" in x
the code is the following
import os
path = "C:\\Windows\\System32\\v1"
os.stat(path)
The solutions that i came across are no use to solve my problem and i want to ask is there a possible way to get permissions to execute os.stat()
to that specific folder and furthermore to do it via python?