by Opositive » Mon Jan 25, 2021 2:34 pm
As noted above, the format used on the drive is critical to this discussion.
Most USB flash drives sold today are formatted as either FAT32 or exFAT. Both of these file systems are case insensitive/case preserving. The Windows OS will represent the files to you with the same mixed-case filename that they were originally stored with (case preserving) but the OS actually stores and handles filenames in a way that doesn't care about the case (case insensitive).
Because of this simply changing the case of a filename on any FAT-formatted drive (FAT, FAT16, FAT32, exFAT) will do absolutely nothing. Changes that result in two filenames that differ only by case will not be recorded by the filesystem. In order to make the case changes stick you have to make some other change to the filename (e.g. adding or deleting characters) along with the case changes and then go back and undo the additional change. This forces the OS to rewrite the filename and preserve the altered case.
For instance, if you want to change "randomfile.txt" to "RandomFile.txt" you first need to change it to something like "ARandomFile.txt" and then change it again to "RandomFile.txt". This is easily done with BRU but it's a pain no matter how you look at it. It's not BRU's fault, though. It's due to the limitation of the file system.
Other filesystems like NTFS store the filename in a fundamentally different way from the FAT-based systems and can be used in a case-sensitive manner. Formatting a flash drive with NTFS, though, is generally not a great a idea for a number of reasons. There are times when you want to do it but see any of the voluminous discussions about it on the net to understand the pros and cons before you do.
Note that the OS also plays a role in all this. Windows effectively comes out-of-the-box case insensitive/case preserving regardless of what file system is used on a drive. This is due to a Windows "feature" called "prettying the path". This behavior can be changed, however, using the "DontPrettyPath" key in the registry. How that's done is beyond the scope of this forum. Just Google "DontPrettyPath" and you'll get all the info you want. Just be warned that changing that key can cause unexpected behavior when renaming files on network shares. Caution is advised.
So you just need to do a two-step dance to get it working. It's usually the best you can you given the limits of the filesystem and OS you're working with.
Good luck with it.
Opos.