I created a directory above the character limit adding "\\?\" before the directory, but I can't delete it using shutil.rmtree
or list it using os.walk
.
I get the following error with shutil.rmtree("folder")
:
WindowsError: [Error 3] The system cannot find the path specified: 'folder\CAAAAAAAAAB2iMan9VH4-0fxO4JOiT43bz9XVbQUoCcdOJTk1WRcPA++\BwAAAAAAAACXEWzr-_xJujcfpbaeAa-zNMqou1c_EtOH1lGXEMaL8w++\CAAAAAAAAACq0GkU9kGYNVDcaXAZ78ut8FSHTvE45Ra69qN495R6Fw++\CgAAAAAAAAAsOJ6oX-y6iRcg2F3KB4HGi6kcWnU2QPO2CEKsJUA4-g++'
Is there a function I can use to remove that directory?
Thanks.