How to Force Your Windows File and Folder Names to Have the Case You Want


One of the quirks in the Windows operating system is that it does not distinguish between upper case and lower case in file and folder names. This led Tech Tips reader Hilly to post this question:

“I have created folders in my documents which are in lower case, I want to change this from lower to upper. I have gone on to rename and typed exactly the same as what the folder already says but for some reason it just converts it back to lower there any reason why this is happening?”

As far as Windows is concerned, “MYfilename” is the same file as “myfilename”. If you try to change the case, Windows will often ignore you. Microsoft calls it "prettying the path". If you want to change the case of a file or folder name, here is a trick that I have used.

  1. Rename the file or folder by adding a character to the front.
  2. Rename the file or folder again, this time deleting the added character and making the case change that you want.

The case change should now stick.

If you are experienced with editing the Registry, you can configure Windows to let you make case changes without interference:

  1. Open Regedit
  2. Navigate to HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced
  3. In the right pane, double-click the value name DontPrettyPath (or create it as a REG_DWORD if it doesn't exist)
  4. Set the data value to 1
  5. Click “OK”
  6. Close Regedit
  7. Log off and back on

Now the case of file and folder names should stay the way you type them. This edit should work in Windows XP, Vista, and 7.

Incidentally, it is worth noting that Unix-based systems like Linux and FreeBSD consider upper and lower case to designate different characters. This can be important on the Internet. Although domain names are not case-sensitive, directory and file names on Internet servers that use a Unix-based system are. This means that web links containing file names must be written with the proper case. Otherwise, you get an error message. 

Get your own favorite tip published! Know a neat tech tip or trick? Then why not have it published here and receive full credit? Click here to tell us your tip.

This tips section is maintained by Vic Laurie. Vic runs several websites with Windows how-to's, guides, and tutorials, including a site for learning about Windows and the Internet and another with Windows 7 tips.

Click here for more items like this. Better still, get Tech Tips delivered via your RSS feeder or alternatively, have the RSS feed sent as email direct to your in-box.

Please rate this article: 

Your rating: None
Average: 4.5 (28 votes)


Just for more information, it appears that only certain Windows applications such as Windows Explorer have this l̶i̶m̶i̶t̶a̶t̶i̶o̶n̶ feature. The underlying file APIs do not do this. You can check this by writing a simple .NET application that uses System.IO.File methods to move files from one location to another. It will happily move "MYFileName.txt" to "myfilename.txt", although you might only see the change in Explorer after you refresh or close and open Explorer again.