Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to make Windows 7 case-sensitive when it reads/writes anything on the hard drive (the C drive, or any other NTFS drive).

I found a video via google that says to change the registry key

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\DontPrettyPath

to a value of 1 (source).

I also found a Windows support item that says something about modifying the registry key

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive

that leads me to assume putting a value of 0 will make Windows case-sensitive with NTFS filesystems (source).

I have a feeling the second solution is the answer, but I'm not sure and I don't want to try it without being sure.

Does anyone know for sure what is the correct way to make Windows 7 case-sensitive when it reads/writes to the C drive (and any other NTFS drive)?

share|improve this question

5 Answers 5

In order to actually create 2 files with the same name but different case in the same directory, you need to install Unix Services 3.5 for Windows. Then you need to run "C Shell" to create the files. You can't create the files through explorer. Once created, explorer doesn't play nice with the files. If you go to rename the second one, the cursor jumps to the first one. Also, most applications can only open one of the files, as they expect a case-insensitive file system.

I was trying to emulate a Linux case-sensitive file-system for debugging purposes during development. It seems the better approach is to use VMWare with an instance of Ubuntu for development.

share|improve this answer

All these settings that you can find on the web are for NFS not for NTFS (note the difference)!

NFS (Network File System) is a file system that is only available on Windows Server 2003 and Windows Server 2008

Windows 7 does not have support of NFS, thus changing the registry key HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive WILL NOT change anything for you.

NTFS is NOT case-sensitive although it remembers the filename case. This mean that despite your file is ABC.TXT it is still accessible by abc.txt and aBc.TxT (for NTFS it is the same file)

You cannot make it case-sensitive (see update note below).

The other one HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\DontPrettyPath basically turns off the normalization of legacy 8.3 filenames used by DOS (which are all caps). When it is turned on (default) ABC.TXT will be displayed as Abc.txt.

Update (to be more accurate):

Actually it depends of the software that access the FS. If it uses WIN32 API (which 99.9% of the software does) it will be case-insensitive whatever you do.

If the software is POSIX (don't ask), it will depend on the above registry setting. Such a software is the NFS Service which, as I said before, is only distributed with the Server versions of Windows (and I think with Win 7 Ultimate). You can search and enable NFS Service in "Add/Remove Widows features" section in control panel (if it is available in your OS).

However all built-in software in Windows (like Explorer, command prompt, Internet Explorer and etc.) and all consumer software out there uses WIN32 and that means is always case-sensitive. Thus NFS won't help you either.

share|improve this answer
2  
Actually, on a FS level before additional processing it IS case sensitive, however, NTFS translates all file names to all uppercase and when one with lowercase characters is entered translates it to uppercase then looks for said file.(see support.microsoft.com/kb/103657) –  Jeff F. May 30 '12 at 18:30
    
You are right. I just tried to explain it simpler. –  venimus Jun 4 '12 at 16:31
5  
Your emphasized statement "NTFS is NOT case-sensitive" is incorrect and should be changed. You walk it back a little in your update, but you really should change the original emphasized statement. To wit: "NTFS is technically case sensitive, but Win32 is not" –  nexus Jul 19 '13 at 9:23

What Microsoft has to say about NTFS and changing case sensitivity.

Looks like you do not have to change the kernel to allow case sensitive lookups on the network.

http://technet.microsoft.com/en-us/library/cc783185(WS.10).aspx

.

Configuring case sensitivity for file and folder names

Applies To: Windows Server 2003 R2

To configure case sensitivity for file and folder names using the Windows interface Open Microsoft Services for Network File System: click Start, point to Programs, point to Administrative Tools, and then click Microsoft Services for Network File System.

If necessary, connect to the computer you want to manage.

Right-click Server for NFS, and then click Properties.

Click the Filename Handling tab.

Do one of the following:

To enable case-sensitive file and directory name lookups, select the Enable case sensitive lookups check box.

To disable case-sensitive file and directory name lookups, clear the Enable case sensitive lookups check box.

Click Apply.

Important These changes will not take effect until Server for NFS is restarted. For information about how to stop and start Server for NFS, see Starting and stopping Server for NFS. You also need to disable Windows kernel case-insensitivity in order for Server for NFS to support case-sensitive file names. You can disable Windows kernel case-insensitivity by clearing the following registry key to 0: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel DWORD “obcaseinsensitive”

To configure case sensitivity for file and folder names using the command line Open the command prompt.

To enable case sensitivity, type the following:

nfsadmin server [ ComputerName ] config casesensitivelookups=yes

To disable case sensitivity and optionally specify the case of file names returned by Server for NFS, at a command prompt, type the following:

nfsadmin server [ ComputerName ] config casesensitivelookups=no [ntfscase={upper | lower | preserve}]

Argument > Computer Name = The name of the computer you want to configure.

Important These changes will not take effect until Server for NFS is restarted. For information about how to stop and start Server for NFS, see Starting and stopping Server for NFS.

Note The ntfscase option sets the case sensitivity for the NTFS file system. The default case sensitivity is preserve (preserve case). To view the complete syntax for this command, at a command prompt, type: nfsadmin server /?

.

share|improve this answer
1  
I dan't think this allows for having multiple files with the same name, which is what he wants to do. –  tjameson Apr 3 '11 at 21:10
1  
Then he will have to do the registry hack. –  Moab Apr 3 '11 at 21:32
    
Applies To: Windows Server 2008 R2 –  ray pixar May 29 at 11:56

I think this is what you're looking for:

http://www.chilkatsoft.com/p/p_454.asp

This page recommends setting HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\ dword:ObCaseInsensitive to 0 to make it case-sensitive. I think you found this already though, and this looks like the standard way to do it (even the Microsoft KB you found suggests it).

It looks like you have to change kernel settings. Beware of updates though.

EDIT: Watch out though, some programs might depend on case insensitivity.

EDIT: You could probably use a UDF partition. This filesystem is case-sensitive and I think it works on both Windows and Linux.

See this and this.

share|improve this answer
    
Can you post more information from the page you link to please. Don't copy the whole thing but you can copy the relevant paragraph and summarise the rest. –  ChrisF Apr 3 '11 at 18:23
    
Well, the whole page only is a paragraph. I'll make a quick edit though. –  tjameson Apr 3 '11 at 18:24
    
Thanks tjameson. Regarding programs that might depend on case insensitivity, this is indeed a big problem. A program might look for "WINDOWS" and not find it because it is really "Windows" now, right? Shoot, I'm at a loss trying to figure out how to copy things over from Linux to Windows, and I've found myself in a situation where folders of the same spelling with different caps exist in one location. –  trusktr Apr 3 '11 at 18:36
    
Well, the only thing I can think of is to conflicts manually. If you copy files over, Windows should ask you if you want to merge or make a copy or something. I can't remember (I'm a linux man myself). –  tjameson Apr 3 '11 at 18:40
    
According to this article this only works for non-Win32 subsystems, so doesn't apply to NTFS. –  harrymc Apr 3 '11 at 18:42

Microsoft states ;

In NTFS, names preserve case, but are not case sensitive.
NTFS makes no distinction of filenames based on case.

Allowing case-sensitivity under Windows would allow malware to create files that the user can't access or delete, so it is not allowed for a good reason.

In any case, I am quite sure that if you managed to make NTFS case-sensitive, Windows will crash and re-installation will be the only solution.

share|improve this answer
    
You are also correct that it presents a security issue if you do. "For example, a version of edit.exe infected with a Trojan horse-type malicious program, and named EDIT.EXE, could be stored in the same directory as edit.exe. If a user were to type edit at a Windows command prompt, the Trojan horse version (EDIT.EXE) could be executed instead of the standard version"..technet.microsoft.com/en-us/library/cc732389.aspx –  Moab Apr 3 '11 at 20:21
    
It probably won't crash Windows unless you rename key files/folders. I'm pretty sure that Windows makes sure to use the correct case, in fact, they even recommend it. –  tjameson Apr 3 '11 at 21:12
    
Hmm, that's interesting tjameson. Can you provide a link to that recommendation? –  trusktr Nov 1 '11 at 23:55
7  
If malware gets write access to your disk, you have big problems whether your filesystem is case sensitive or not. #redherring –  Leopd Jan 11 '12 at 0:43
2  
The Registry is chock-full of references to system files with wildly inconsistent case usage. Case-sensitivity would cause massive breakage. –  kreemoweet Jun 4 '12 at 19:49

Your Answer

 
discard

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.