I am trying to open multiple files on Windows 10 with PIL. Each of these files have a very long hash combinations as their name. Storing them directly in:
C:\\Users\\my-user-name\\PycharmProjects\\MyProject\\.........
works, but as soon as I place them in one additional sub level, e.g.:
C:\\Users\\my-user-name\\PycharmProjects\\MyProject\\sub-folder\\.........
it is no longer possible to open them because the string becomes to long.
According to Long paths in Python on Windows I tried to add \?\ in front of the path, e.g.:
f = '\\?\C:\\Users\\my-user-name\\PycharmProjects\\MyProject\\sub-folder\\...'
Image.open(f)
but unfortunately it does not work for me.
Any suggestions?