Case preservation is the ability of a computer file system to remember the capitalization that is used when a file is created. Many popular operating systems have case preservation, while older operating systems and some shell programs do not. One of the main uses for case preservation is in operating systems that enforce case sensitivity, meaning capital letters are recognized as separate symbols from lowercase letters. Another use for preserving the case of a file’s name is to allow users to employ their own formatting techniques that will be displayed by the operating system, sometimes leading to a cleaner appearance. In operating systems that do not use case preservation, the default behavior can vary but generally involves converting all the characters in a filename into either uppercase or lowercase letters.
When a file is created, most file systems store the name of the file as metadata in a special area of the disk being used. During the early period of computing, disk space was at a premium and led to the development of different methods to help save as much space as possible. Early file systems sometimes forced a filename into all lower-case or uppercase letters so the name could be stored more efficiently. Other systems ignored the case of letters to help maintain consistency among filenames and to avoid user confusion. As technology advanced, however, most operating systems and file systems included support for case preservation.
It is important to distinguish between case preservation and case sensitivity. Just because a file system preserves the case of a filename does not necessarily mean it considers the lowercase and uppercase letters to be different symbols. Many operating systems preserve the case but allow users to type in the filename using any letter-case combinations to refer to the file. Alternately, in a case-sensitive system, files can have the same name but be distinguished by the capitalization of the letters. Among common examples are files called readme files; in a case-sensitive, case-preservation system, the files README, Readme, and readme are all different files that can exist in the same directory.
One note about filenames and case preservation is that, even though a particular file system or operating system supports preservation and does not enforce case sensitivity, programs that run in the operating system might. This is especially true with emulators and programs that use command lines for input. These programs can employ sensitivity or disregard case in a new file based on how they are programmed, even though the underlying operating system normally would not.