Though Windows is case insensitive, it does preserve case in filenames. In Python, is there any way to get a filename with case as it is stored on the file system?
Here's the simplest way to do it:
>>> import win32api >>> win32api.GetLongPathName(win32api.GetShortPathName('texas.txt'))) 'TEXAS.txt'