<!--
  canonical-url: https://www.avonture.be/blog/dos-case-sensitive
  published:     2025-03-02
  This is a static plain-Markdown mirror generated at build time.
  Visit the canonical URL above for the fully rendered page, with images and interactive components.
-->

# Enable case sensitivity for filenames under DOS

> Learn how to enable case sensitivity for filenames in a specific folder on Windows, just like on Linux. Use PowerShell and the fsutil.exe command.

---
![Enable case sensitivity for filenames under DOS](/img/v2/msdos_tips.webp)

**TL;DR**

Did you know you can make a folder on Windows case-sensitive, just like on Linux? This quick tutorial shows you how to enable case-sensitivity for filenames in a specific directory using a single command. By running `fsutil.exe file setCaseSensitiveInfo . enable` in an administrative PowerShell, you can have `MyFile.txt` and `myfile.txt` exist as two separate files in the same folder.

This is just ... for fun.

As you know, MS DOS didn't make any difference between `MyFile.txt`, `myfile.txt`, `MYFILE.txt` since DOS isn't case sensitive.

If you don't believe me, just start notepad, type a few characters and save your work once as `MyFile.txt` then as `myfile.txt` then as `MYFILE.txt`. Then look at your folder, how many documents do you have? Just one.

Under Linux, you would have had three files; not under DOS.

What if we asked DOS to change its ways?

Here's the result: three files, same name, different case, living side by side in the same Windows folder.

![Case sensitivity has been enabled](./images/case_sensitivity_enabled.webp)

To do this, you'll need to start [Windows PowerShell](/blog/windows-terminal) as an admin.

![Start PowerShell as an admin](./images/powershell_admin.webp)

Then jump in the folder where you want to enable case sensitivity. Let's say in C:\Temp.

In your PowerShell console, now start `fsutil.exe file setCaseSensitiveInfo . enable` and press `Enter`. After a few seconds, the change will be made — the same result already shown at the top of this article.

To revert your change, run `fsutil.exe file setCaseSensitiveInfo . disable` but, first, you'll have to remove at least two files because DOS will prevent you from disabling the feature if this would create conflicts.

*Case sensitivity is not the only Windows/Linux mismatch that will bite you when the same repository is used on both systems; line endings are another one, and [Git - Some tips for your .gitconfig file](/blog/git-config) shows the setting that prevents git from silently rewriting them.*
