Windows – How to create a virtual disk with a case-sensitive filesystem on Windows 7

filesystemsvirtual drivewindowswindows 7

I don't care which filesystem exactly it will be, I just need the file paths to work in a case-sensitive manner.

Maybe a behavior similar to a samba share on Linux box that has case-sensitivity turned on. That would be perfect, except that I need the disk to be stored locally.

Are there any drivers/tools for that?

I have already tried a couple of ext2 drivers for Windows which didn't work for this purpose 🙁 ( http://www.fs-driver.org/ and http://www.fs-driver.org/)

Best Answer

The simple answer is no. The long answer is...

NTFS does store filenames in a case-sensitive way (NTFS can have README.txt and readme.txt in the same directory), and even the Windows filemanager can internally manage case-sensitive requests to filenames via the NtOpenFile / NtCreateFile syscalls.

Unfortunately for you, the Win32 function CreateFile (used everywhere including by fopen) will internally call NtCreateFile using the OBJ_CASE_INSENSITIVE flag which will mean that all applications which use CreateFile will see your case-sensitive filesystem case-insensitively. In practise this means that all applications will see your filesystem in a case-insensitive way regardless of whether your filesystem is actually case-sensitive under the hood.

The only way I can think for you to practically force case-sensitivity is to write a filter-driver which will remove the OBJ_CASE_INSENSITIVE flag from the incoming syscall requests which will then allow NTFS, EXT2 or whatever internal filesystem you have to behave in their default, case-sensitive way.