Forum Home
Press F1
 
Thread ID: 121616 2011-11-03 01:22:00 How do you make Windows 7 have lower case file extensions ? Digby (677) Press F1
Post ID Timestamp Content User
1241523 2011-11-03 01:22:00 Hi Guys

I have Windows 7
When I copy files from my camera they always have an upper case JPG extention.

Is there a way of customise Windows so that the extension comes in as lower case.

eg .jpg
Digby (677)
1241524 2011-11-03 01:48:00 By default they do.

I'd say at a guess its something to do with the camera.

What happens if you right click/New - Word doc or bmp image, does that have the extensions in lower case ?
wainuitech (129)
1241525 2011-11-03 02:45:00 Hi Guys

I have Windows 7
When I copy files from my camera they always have an upper case JPG extention.

Is there a way of customise Windows so that the extension comes in as lower case.

eg .jpgIt's not a windows thing; it's set by whatever created the files in the first place (in this case, by your camera).

The only way to correct this is to rename the offending files - note that if you're using a FAT filesystem, you can't simply change the case - you need to rename it to something else first, then back to the correct name with the correct case.

If you have a Linux install around, or a live cd, this command will fix it for you:
find . -type f -name '*.JPG' | while read f; do mv "$f" "$f.move" && mv "$f.move" "$(echo "$f" | sed -e 's/.JPG$/.jpg/')"; doneIt searches the current directory and everything under it for files with a name ending in '.JPG', and changes the 'JPG' part to lowercase.
Erayd (23)
1241526 2011-11-03 17:51:00 Thanks guys

@Wainuitech.
Yes new creates lower cash extensions.

So it must be my camera that is creating the upper case extensions.

I'll have a look in my camera manual.
Digby (677)
1241527 2011-11-03 20:31:00 I dont recall that issue for FAT32, maybe I just never tried it. Try from a command prompt (navigate to the dir first) "rename *.JPG *.jpg" without the speech marks, or put that command in a batch file copy it to the dir and double click it. You can make a batch file with notepad, just save as something like rename.bat instead of .txt

amazing how handy DOS commands can still be :)
dugimodo (138)
1241528 2011-11-03 20:47:00 I dont recall that issue for FAT32, maybe I just never tried it.It's because FAT considers filenames of identical spelling but differing case to be the same file - as a result, most implementations of it will either spit out an error if you try to just rename it to the correct case, or they'll appear to succeed but won't change anything.

NTFS does not have the same limitation, nor does any proper case-sensitive filesystem (which is most of them).


..."rename *.JPG *.jpg"...That command won't work recursively - it only renames files in the current directory, it can't handle files in subdirectories.

I also suspect it'll run into the FAT renaming issue I mentioned above, if you try to use it on a FAT filesystem - it depends on how Microsoft have implemented the rename command.


amazing how handy DOS commands can still be :)I'll take a proper unix-style shell over that anyday :D. The windows shell is so limited it's not funny (and yes, PowerShell is better than the standard one, but it's still not a patch on bash :devil).
Erayd (23)
1241529 2011-11-03 20:58:00 Well I moved to NTFS as soon as I moved to XP so any such issues are well in the past for me.
I wasn't comparing relative merits of any shells or OS's , simply offering a command that will work in windows. And it's very quick, takes no noticeable time to rename my whole .doc dir to .DOC at work i just tried so it's no real effort to make a batch file and copy it into any dir you want to rename.

There is probably a way to write a more complicated batch file to work recursively, but I'm not that good at DOS and haven't used it for anything much in years apart from the occasional rename or delete command (ever noticed in XP when a file refuses to delete the DOS command often works?)
dugimodo (138)
1