One of the things that users with Linux and other UNIX-like operating systems can enjoy is the freedom to enable case-sensitive file naming. If you’re a Windows 10 user, you will be delighted to know that the same feature is now available on your OS. Once you enable this feature, your computer’s processes will be able to properly handle case-sensitive folders and files. To put it another way, you can have files named ‘coffee’ and ‘Coffee’ in the same folder without any conflict.

How Case Sensitivity on Windows 10 Files and Folders Work

Case sensitivity on Windows 10 is an NTFS system feature that can be enabled on a per-directory basis. This means that it wouldn’t apply to your entire file system. That said, you can only add the feature to specific folders for development purposes.

Case sensitivity on Windows 10 was included in the April 2018 Update. Before this feature was added to the system, users could only mount case sensitive folders within the Bash on Windows environment, which is also referred to as the Windows Subsystem for Linux. Such a process worked perfectly within the Linux environment, but it created a conflict with normal Windows applications.

You can use Command Prompt or PowerShell to enable this feature. By default, the folders you create within the Linux environment will automatically be configured to be case sensitive too.

Steps on Setting a Directory as Case Sensitive

When setting a directory as case sensitive, you will need Administrator access. This is the only way you can freely run the fsutil.exe command. What you need to do is ‘write attributes’ permission for the directory you wish to change. Generally, this also means that you have to possess Administrator rights to be able to modify a folder somewhere outside your user folder. For instance, if you’re changing a folder like c:\project, you would need Administrator privileges. On the other hand, if you’re editing inside your own user folder like c:\users\NAME\project, you wouldn’t need the same access.

Before you proceed with the steps, make sure that no Linux software is currently referencing the directory that you are about to change. It is important not to change the case sensitivity flag on that particular folder. Problems may occur because Linux applications won’t be able to recognize the change.

If you’re ready to set a directory as case sensitive, follow the instructions below:

  1. Right-click the Windows logo on your taskbar.
  2. Select Command Prompt (Admin) or PowerShell (Admin) from the list.
  3. Run the following command:

fsutil.exe file setCaseSensitiveInfo C:\folder enable

Note: replace ‘C:\folder’ with the path to the folder you wish to change.

  1. If there is space in the folder path, make sure you use quotation marks to enclose it, like so:

fsutil.exe file setCaseSensitiveInfo “C:\my folder” enable

It is worth noting that only the specific folder you change will be affected by the case sensitivity flag. This means that its subfolders would not automatically inherit the feature. To put it another way, if you have a C:\folder\things subfolder in C:\folder, the ‘things’ subfolder wouldn’t be case sensitive. If you want it to follow the same suit, then you would have to separately run the fsutil.exe command on it.

Case sensitive folders created by Linux tools

When you run Linux tools inside the Windows Subsystem for Linux (Bash shell), there will be a case sensitivity flag on every new folder you create. The DrvFs file system in the Linux environment is automatically set to use the case=dir flag. This means that the Linux environment is set to acknowledge every directory’s NTFS flag. If you want to change this option, you can do so in your wsl.conf file.

You wouldn’t need the fsutil.exe command if you create folders from the Linux environment.

How to Know if a Directory is Case Sensitive

If you want to know if a directory is case sensitive, you just have to follow the instructions below.

  1. Press Windows Key+S on your keyboard.
  2. Type “command prompt” (no quotes).
  3. Right-click Command Prompt in the results, then select Run as Administrator.
  4. Once Command Prompt is up, paste the text below:

fsutil.exe file queryCaseSensitiveInfo C:\folderCheck if a directory is case sensitive

  1. Note: Replace ‘C:\folder’ with the name of the folder you want to check.
  2. If the directory is case sensitive, you will see the following message:

Case sensitive attribute on directory [path] is enabled.

  1. On the other hand, if the standard Windows case insensitivity is used on the directory, you will see this message:

Case sensitive attribute on directory [path] is disabled.

How to make a directory case insensitive

If you want to bring back a directory to its case insensitive state, just follow the steps below:

  1. Go to your taskbar and click the Search icon.
  2. Type “command prompt” (no quotes).
  3. You will see Command Prompt in the results. Right-click it, then choose Run as Administrator.
  4. In Command Prompt, paste the following text:

fsutil.exe file setCaseSensitiveInfo C:\folder disable

Note: Make sure you replace ‘C:\folder’ with the path you wish to modify.

Once you disable case sensitivity in a specific folder that contains files with conflicting names, you will see this message:

Error: The directory is not empty

You would have to rename or remove the conflicting files before you can complete the command.

We would like to advise you installing Auslogics BoostSpeed if you are interested in speeding up your PC. This step will save your time and give you better performance without much efforts.

What do you think of case sensitivity on Windows 10 files and folders?

Share your thoughts in the comments below!