Python Forum

Full Version: p]Why os.path.exists("abc/d") and os.path.exists("abc/D") treat same
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Why os.path.exists("abc/d") and os.path.exists("abc/D") treat same but actually both are different path. Before running create abc folder and then inside abc folder create d folder to test it.
print(os.path.exists("abc/d")==os.path.exists("abc/D"))
Output it gives is true and it should be false.
I guess you're on a Windows-System where the file-system is not case-sensitive.
If you want to have False as result, you've to switch to Linux, Mac or some other *bsd like system.