Skip to main content

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.

· 2 min read
View raw
Christophe
Markdown, WSL and Docker lover ~ Insatiable curious.
Cet article existe aussi en français — lire la version française.

This article is over a year old but was reviewed on July 30, 2026 — the content is still accurate.

Enable case sensitivity for filenames under DOS

⚡
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

To do this, you'll need to start Windows PowerShell as an admin.

Start PowerShell as an admin

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 shows the setting that prevents git from silently rewriting them.


🦋 Join the conversation on BlueskyRequires a free Bluesky account to like, repost or comment. This block talks to Bluesky's public API directly from your browser (no cookies, no sign-in) — that means your IP address reaches Bluesky's servers just by this section loading.

Loading comments…

Was this article helpful?
Did you try the steps in this article?