I am migrating a Linux/Apache/PHP website to a server running Windows Server 2008 R2/IIS 7.0.

I have everything working except one minor issue. The file system on the Linux box is case-sensitive and many of the files will have duplicate filenames on Windows.

How would I go about making the folder C:\Website\Site1 case-sensitive so that I can store all the files on the original server there?

If I have to turn on case-sensitivity for the entire server, so be it. There is nothing else running on it.

migrated from stackoverflow.com May 12 '11 at 19:09

This question came from our site for professional and enthusiast programmers.

  • 3
    I think you have it backwards. Linux is case sensitive, windows is not. – Chris Kooken May 10 '11 at 19:45
  • OK, forget NTFS. I can make a volume with whatever file system I need, so long as Windows Server 2008 supports it. Any ideas? – Eric May 10 '11 at 22:52

You can't enable case sensitivity for a single folder or volume on Windows, but you can do it for the whole system.

You need to change the value of the Registry key

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

from 1 to 0 and reboot the system.


I'm not really answering the OP's question, but an alternative might be to run a script that finds duplicate-named files and folders and renames one of them (maybe add a '~1' on the end of the name).

You may have this file server for a long time (our current one is running for about 7 years now), and you probably won't want to have to deal with this again in a future migration, in case your forget about it, or in case you leave and it causes a headache for a future sysadmin who did not realize this was done (referring to Massimo's answer).

  • If the web site contains links (which it very likely does), this is going to break everything. – Massimo Jun 6 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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