Blog

Gavin Pickin

June 01, 2022

Spread the word


Share your thoughts

In the last blog post in this series, we discussed Case Sensitivity on Windows, what is it, why does it matter, and how it could mess up your developer day in ways you never thought of. In this blog post, we're going to show you how to enable case sensitivity in windows, for a given folder, all folders underneath it, and explain how that case sensitivity is inherited, and when it isn't.

Enabling Case Sensitivity on Windows 10

If you are in Windows 10, version 1803 or above, the following steps should work for you.

  1. Open Powershell as an Administrator. The easiest way to do this is to click start, search for powershell, and then right click and select Run as Administrator.
  2. Get the path of the folder that you wish to make Case Sensitive - DO NOT DO IT ON YOUR ENTIRE DRIVE
  3. Run this comment, replacing the path with the path you wish to make Case Sensitive

fsutil.exe file SetCaseSensitiveInfo C:\folder\path enable

Remember to replace C:\folder\path with your path.

Once you have run that command, you will be able to create new files and folders with the same name of differing cases... and the NFTS file system will treat them as different files. Remember, this only sets this for the one folder.

How does that Folder's Case Sensitivity interact with Children Files and Folders

By running this command, you are only changing the status of this folder. Depending on if you create few files and folders, moving or cutting files, copying files, will inherit this status differently.

What happens if I create a new Folder in this Case Sensitive Folder?

This folder you create will inherit the case sensitive nature. So everything inside of a folder created in this case sensitive folder will be case sensitive too.

What if I copy and paste a folder into this Case Sensitive Folder?

Copying is essentially creating a new set of files and folders that match existing files and or folders elsewhere, since they are being created, they will inherit the case sensitivity.

What if I move, drag, or cut and paste a folder into this Case Sensitive Folder?

This is moving a file or folder, those existing files have settings, and they will bring over their current status, of case sensitive or not, and will not inherit.

Recursively change subfolders to case sensitive in Windows 10

Now, of course, changing every folder, one by one would be tedious. Here is a script you can run in PowerShell to recursively enable case sensitivity on all of your children's folders. This uses your current folder, so it will change all children of the current folder.

(Get-ChildItem -Recurse -Directory).FullName | ForEach-Object {fsutil.exe file setCaseSensitiveInfo $_ enable}

Note: I would choose a folder called web or projects and then do that, not your entire machine, as it would cause many headaches.

Windows 11

Apparently in Windows 11, you can only set an empty folder to case sensitive (with the same script), and then as you move files in, they will inherit. I don't have windows 11 to be able to test that. Please let us know if you have it, and see if that works, because in Windows 10, moving files will not inherit.

Reverting Case Sensitive

Unfortunately, this might cause some issues with your software, you might need to revert. To do so, use the same command, but set the enable flag to disable

(Get-ChildItem -Recurse -Directory).FullName | ForEach-Object {fsutil.exe file setCaseSensitiveInfo $_ disable}

Video on how to enable case sensitivity and to see it in action

 

Warning: Just because NTFS File System is Case Sensitive, doesn't mean the apps support this. Be careful.

Check out the next blog post where we'll show you some of the issues we ran into with Case Sensitivity in Windows, and how it might not be the silver bullet we thought it was.

Add Your Comment

Recent Entries

Is Cloud the Answer for Your ColdFusion Dilemma?

Is Cloud the Answer for Your ColdFusion Dilemma?

Feeling the limits of an on-premise ColdFusion setup?

Many businesses face high costs, limited scalability, and performance bottlenecks, leaving them wondering if the cloud could be the answer.

In our FREE whitepaper, "Is Cloud the Answer for Your ColdFusion Dilemma?", we explore:

  • Benefits of Migrating to the Cloud: From cost savings to increased flexibility, find out what a cloud-based ColdFusion setup can do.
Cristobal Escobar
Cristobal Escobar
November 13, 2024
Mastering Events and Listeners in CBWIRE

Mastering Events and Listeners in CBWIRE

In CBWIRE, events and listeners are the backbone of building responsive, modular applications without relying heavily on JavaScript. This guide walks you through setting up and using CBWIRE events to create seamless interactions between components, from dispatching events in CFML and frontend templates to listening with Alpine.js and JavaScript. Learn how to make your applications feel dynamic and engaging by effortlessly connecting components. Whether you’re triggering events to update a dashboard or targeting specific parts of your app with dispatchTo, these techniques will empower you to create a modern, interactive CFML experience with ease.

Grant Copley
Grant Copley
November 11, 2024
10 Key Benefits of Hiring a Specialized ColdFusion Consulting Team

10 Key Benefits of Hiring a Specialized ColdFusion Consulting Team

ColdFusion remains a powerful and versatile platform for building dynamic web applications. However, keeping your ColdFusion environment optimized, secure, and scalable requires specialized expertise. Whether managing a long-standing ColdFusion application or planning new development projects, hiring a dedicated ColdFusion consulting and support team can be a game-changer for CTOs, CIOs, and developers. Here's why:

1. Expert Guidance on ColdFusion Web Development

...

Cristobal Escobar
Cristobal Escobar
November 08, 2024