How can I force Windows to make a file lower-case only?

I am having an issue when developing a WordPress plugin in Windows, and then uploading it to any server running Linux. Originally, the filename of the file was Blue.png and thus I changed it to blue.png. At first it wouldn't change (or it did but was still saying Blue.png), I switched folders and came back and it was blue.png.

Now when I upload this plugin to any server running Linux, it reads the filename as Blue.png so now my plugin cannot find that file and throws an error.

What can I do to force it to use blue.png as the filename?


Windows does treat filenames in apparently odd ways, and because it is case insensitive you can find that just trying to change the case of a filename can be problematical. Thing aren't help by the fact that, for example, if the filename is all upper case it will get displayed in initial case, which makes it difficult know what case the filename actually has.

The simplest solution is to either delete the file and recreate it or rename it to something completely different and then back to the name you actually want. So in your case you'd go:

Blue.png -> green.png -> blue.png

If you are using source control then you'll have to perform this rename in your source control application rather than in Windows. In this case Windows is being told what the name is and you can't modify it.