2

Different operating systems have different rules for determining if two file names match or not. For example, comparing 'abc' to 'ABC.' would be the same file under Windows but completely different files under Linux. Is there a built in function to compare those names?

Failing that, is there a way to convert any arbitrary file name to its canonical representation for the OS?

Mark Ransom
  • 299,747
  • 42
  • 398
  • 622
  • It's even worse. On Unix it's filesystem-specific, you can have case-sensitive and case-insensitive filesystems. E.g. if you mount a Windows fileserver. – Barmar May 09 '22 at 17:40
  • @Barmar yes I knew about that complication but thought that was just too much to ask. – Mark Ransom May 09 '22 at 17:46
  • related https://stackoverflow.com/questions/7870041/check-if-file-system-is-case-insensitive-in-python – JL Peyret May 09 '22 at 22:30

0 Answers0