- Are IDN domain names case-sensitive?
- 2 Answers 2
- How to enable case sensitive file and folder names on Windows 10?
- How Case Sensitivity on Windows 10 Files and Folders Work
- Steps on Setting a Directory as Case Sensitive
- Case sensitive folders created by Linux tools
- How to Know if a Directory is Case Sensitive
- How to make a directory case insensitive
- www.makeuseof.com
- Follow MUO
- How to Enable Case-Sensitive File Names on Windows
- How to Enable Case-Sensitive File Names on Windows
- Subscribe To Our Newsletter
- One More Step…!
- Enable Case Sensitive Mode for Folders in Windows 10
- More details
- Case sensitivity in Windows
- Per-directory case sensitivity
- Enable Case Sensitive Mode for Folders
- About Sergey Tkachenko
- 2 thoughts on “ Enable Case Sensitive Mode for Folders in Windows 10 ”
Are IDN domain names case-sensitive?
Some people will reply that domain names are not case-sensitive. In the new Unicode world this is no longer true.
I thought one of the steps in the Unicode > Punycode conversion was a «normalisation», which rendered domain names lower case.
2 Answers 2
For old-fashioned ASCII-based domain names, Yes, domain names have been and continue to be case-insensitive.
For example, all of these represent the same domain:
In modern DNS, we now have Internationalized Domain Names (IDN) which allows Unicode characters. The problem is that defining upper- and lowercase can be tricky in some languages and character sets beyond ASCII (Unicode is a superset of US-ASCII).
The intent of domain names is to be case-insensitive, but there may be complications with particular characters in particular scripts of particular human languages. So there is no simple YES or NO answer to your question.
If using non-ASCII domain names, you should read:
WRONG: URLs are still case insensitive, even for IDN.
The question was about IDN: «Are IDN domain names case-sensitive?»
My initial answer is wrong, and does not clearly answer the question. It brings URLs into the mix.
The domain name part (IDN) of a URL is case-insensitive.
The other elements might be case-insensitive or not. It depends on many things, and in general is not predictable.
For instance the path part would normally depend on the OS or even the file system hosting the site (on MacOS you can format the drive as case insensitive or not) But these days you can have some of these paths «hooked» to answer RESTfull APIs. So it depends on how the «hook» is done.
Similar for other elements (user, password, parameters, parameter values)
How to enable case sensitive file and folder names on Windows 10?
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:
- Right-click the Windows logo on your taskbar.
- Select Command Prompt (Admin) or PowerShell (Admin) from the list.
- 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.
- 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.
- Press Windows Key+S on your keyboard.
- Type “command prompt” (no quotes).
- Right-click Command Prompt in the results, then select Run as Administrator.
- Once Command Prompt is up, paste the text below:
fsutil.exe file queryCaseSensitiveInfo C:\folder
- Note: Replace ‘C:\folder’ with the name of the folder you want to check.
- If the directory is case sensitive, you will see the following message:
Case sensitive attribute on directory [path] is enabled.
- 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:
- Go to your taskbar and click the Search icon.
- Type “command prompt” (no quotes).
- You will see Command Prompt in the results. Right-click it, then choose Run as Administrator.
- 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!
www.makeuseof.com
Follow MUO
How to Enable Case-Sensitive File Names on Windows
Most UNIX-based operating systems use case-sensitive file and folder names, but Windows historically hasn’t supported it—until now.
Most UNIX and Linux-based operating systems use case-sensitive file and folder names, but historically, it’s never been an option on Windows.
What do we mean by «case-sensitive file names»? Well, if I create a file in Windows called «Productivity.txt,» I could not create another file in the same folder called «productivity.txt» even though they’re technically different. Windows will throw out an error message saying «There is already a file with the same name in this location»:
By enabling this optional new feature, you can remove this limitation and Windows 10 will see «Productivity.txt» and «productivity.txt» as two separate files.
How to Enable Case-Sensitive File Names on Windows
You need to activate case-sensitive file names on a directory-by-directory basis. And unfortunately, at the time of writing, there is no way to do it through a user interface; instead, you need to use the command line. Follow the instructions below to activate case-sensitive file names on Windows.
Note: Close any Linux apps before continuing.
- Right-click on the Start menu.
- Select PowerShell (Administrator) on the pop-up menu.
- Type fsutil.exe file setCaseSensitiveInfo C:\folder enable, replacing C:\folder with the destination you want to change.
- If the folder you want to edit has a space in its name, put quotation marks around the name (for example, fsutil.exe file setCaseSensitiveInfo «C:\my documents» enable.
Unfortunately, you can only do one folder at a time, and subfolders do not inherit their parent folder’s settings. As such, you will need to repeat the fsutil.exe command for every folder in which you want to enable case-sensitive names.
Lastly, to reverse your changes, head back to PowerShell and type fsutil.exe file setCaseSensitiveInfo «C:\folder» disable (again, replace «C:\folder» with the location in question.
PowerShell is an amazing app, by the way, and it lets you perform lots of advanced tasks on Windows. Learn more about it if you want to kick your Windows administration skills and productivity up several notches.
The company saved on 861,000 tons of metal and reduced its plastic and zinc consumption by removing the charger.
Dan joined MakeUseOf in 2014 and has been Partnerships Director since July 2020. Reach out to him for inquires about sponsored content, affiliate agreements, promotions, and any other forms of partnership. You can also find him roaming the show floor at CES in Las Vegas every year, say hi if you’re going. Prior to his writing career, he was a Financial Consultant.
Subscribe To Our Newsletter
Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!
One More Step…!
Please confirm your email address in the email we just sent you.
Enable Case Sensitive Mode for Folders in Windows 10
As you may already know, the Windows file system, NTFS, treats file and folder names as case insensitive. For example, for the OS and apps, MyFile.txt and myfile.txt are the same file. However, things are different in Linux. For this OS, these are two different files. This difference in behavior may create issues for WSL users. To resolve them, Windows 10 includes the ability to enable case sensitive mode for folders.
If you have used the Windows Subsystem for Linux, you’re probably aware that it allows you to treat your Windows file systems (mounted under /mnt/c, /mnt/d, etc.) as case sensitive. This means, among other things, that you can create files whose names differ only by case (e.g. foo.txt and FOO.TXT).
However, using those files in Windows was not really possible. Since Windows applications treat the file system as case insensitive, they cannot distinguish between files whose names only differ in case. While File Explorer would show both files, only one would be opened regardless of which one you clicked.
Starting with Windows insider build 17093, there is a new way to handle case sensitive files in Windows: per-directory case sensitivity. This ability has been added to give the user better interoperability when using case sensitive files. Also, you can use it with regular Windows applications. Starting in Windows 10 Build 17110, this behavior is the default.
More details
Case sensitivity in Windows
The Windows NT family of operating systems (including Windows 10) has always had the ability to perform case sensitive file system operations. Applications can pass the FILE_FLAG_POSIX_SEMANTICS flag to the CreateFile API to indicate that they want the path to be treated as case sensitive. However, for compatibility reasons, there is a global registry key that overrides this behavior; when this key is set, all file operations are case insensitive, even when the FILE_FLAG_POSIX_SEMANTICS flag is specified. Since Windows XP, this has been the default.
The Windows Subsystem for Linux uses another mechanism, which itself bypasses that registry key, allowing us to perform case sensitive file system operations. This is what allows Linux applications running in WSL to use file names that differ only by case, just like they can on real Linux, even with that global registry key set.
Unfortunately, this leaves you with files that can’t be accessed by Windows applications. While you could change the global registry key, that still would only work for those applications that use FILE_FLAG_POSIX_SEMANTICS , and this would change the behavior for all files on all drives, which may not be intended and may break some applications.
Per-directory case sensitivity
To solve this problem, Microsoft added a new case sensitive flag that can be applied to directories. For directories that have this flag set, all operations on files in that directory are case sensitive, regardless of whether FILE_FLAG_POSIX_SEMANTICS was specified. This means that if you have two files that differ only by case in a directory marked as case sensitive, all applications will be able to access them.
Enable Case Sensitive Mode for Folders
To enable or disable this feature, you should use the built-in fsutil.exe app.
To enable case sensitive mode for folders, do the following.
Substitute the path portion with the correct path matching your PC.
For example,
Now, you can create two files with the same name and with only a case difference. Windows 10 will process them correctly in this particular folder.
To see the feature status for a folder, run the command
fsutil.exe file queryCaseSensitiveInfo «full path to your folder»
You’ll see something like this:
Finally, to disable case sensitive mode for folders, run the next command in the command prompt opened as Administrator:
Use the correct folder path and you are done.
Note: Disabling the CaseSensitiveInfo attribute for non-empty folders is not supported. You must remove all files from the folder before disabling it.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Share this post
About Sergey Tkachenko
Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.
2 thoughts on “ Enable Case Sensitive Mode for Folders in Windows 10 ”
I would really like it if you could add this command to Winaero Tweaker as a tool like how you can merge multiple registry files.