Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I personally thought that NTFS was case insensitive, since you can type cmd, CMD, cMd or even CmD and still get the command prompt. However, why is it that during a CHKDSK x: /f /r, sometimes it fixes capitalization in some files? If it didn't care about the case, it shouldn't matter about that, and CHKDSK shouldn't be checking if it's actually CMD or cmd. Am I right? Where does it actually matter in the file system?

share|improve this question
Note that "case-sensitive" and "case-preserving" are two separate things. NTFS is case-preserving but case-insensitive in the Win32 namespace, but can be case-sensitive in POSIX namespace. – grawity Dec 2 '11 at 22:09
up vote 27 down vote accepted

The case sensitivity of a file system is a separate issue from that of an operating system. Latest Windows releases are based on the NT kernel, which inherits a lot of properties of the non-NT Windows 95 and even MS-DOS. Along with the NT kernel the file system, NTFS, was designed to be case sensitive -- to be POSIX compliant.

Although the Win32 subsystem does not support file names that only differ by case sensitivity, it is possible to create those files with lower level system calls.

share|improve this answer
I'm not aware of an easy way to create such files in Windows. However, calling CreateFile() API with FILE_FLAG_POSIX_SEMANTICS bit should do the job programmatically. – Frank Dec 2 '11 at 23:19
@Luke: Win32 does not support case sensitive files. YOu'll have to make API calls into the OS subsystem. – surfasb Dec 2 '11 at 23:26
@Luke: One easy way would be to mount the NTFS drive from a Linux system and create the files you wish there :) – Hippo Dec 3 '11 at 4:40
Just make sure that you have the right version of Windows NT and install the Subsystem for UNIX-based Applications utilities, people. – JdeBP Dec 3 '11 at 21:05
@Luke: As usual, Wikipedia to the rescue. :-) – afrazier Dec 8 '11 at 17:57

It actually isn't NTFS that you are inquiring about.

NTFS is the filesystem. Your question is really about the case-sensitivity of the Windows command shell. They're completely different. Windows Explorer is a graphical command shell. By entring cmd (in Start | Run for example) you're telling the Windows command shell to execute the command cmd (which itself is actually another command shell, but command line based rather than graphical).

Similarly, CHKDSK is not doing any kind of check on whether you used CMD or cmd. All CHKDSK knows about are the parameters you pass to it, which in this case are x:, /f and /r.

As for CHKDSK "fixing capitalization", I'm not really sure what you mean there.

share|improve this answer
The NTFS is case-sensitive. According to MS KB article 100625: In NTFS, you can create unique file names, stored in the same directory, that differ only in case. For example, the following filenames can coexist in one directory on an NTFS volume: CASE.TXT case.txt case.TXT However, if you attempt to open one of these files in a Win32 application, such as Notepad, you would only have access to one of the files, regardless of the case of the filename you type in the Open File dialog box. – Frank Dec 2 '11 at 21:03
That is true, thank you for clarifying that. I've taken that bit out of my answer since it's not really what is in question here anyway. – squillman Dec 2 '11 at 21:10
> However, if you attempt to open one of these files in a Win32 application, such as Notepad, you would only have access to one of the files, regardless of the case of the filename you type in the Open File dialog box Which one? – Synetech Dec 3 '11 at 23:03
@Synetech: The first one, perhaps? Depends on the file order in the directory, and possibly the moon phase. – grawity Dec 4 '11 at 0:10

I suspect the question asker's claim that chkdsk.exe is "fixing capitalization in some files" is actually prompted by the message from CHKDSK that occurs under some circumstances:

correcting errors in the uppercase file

Basically, this results from a Windows XP version of chkdsk.exe running against an NTFS volume that has been formatted in a later version of Windows, as described in Error message when you run Chkdsk.exe on a Windows XP-based or on a Windows Server 2003-based computer: “Correcting errors in the uppercase file”. The upshot is that this is really not an error, and has nothing to do with case sensitivity.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.