PDA

View Full Version : Converting filenames to lowercase



Mike
21-02-2005, 08:54 AM
In Windows 2000 is there a command prompt command to convert from uppercase to lowercase filenames (or a mixture of upper/lower to lower)? It needs to be command-line. Or is there something I can download to perform this easily.

Also it would be preferable to be able to batch or bulk convert, and take wildcards.

Thanks,
Mike.

Graham L
21-02-2005, 02:48 PM
I doubt strongly if there's a command. Microsoft have traditionally thought that uppercase was good enough for you lot. ;)

It's not too difficult to do it in a scripting language or in a *NIX shell, , but it would be messy. Someone's probably done that.

Mike
21-02-2005, 06:54 PM
I doubt strongly if there's a command. Microsoft have traditionally thought that uppercase was good enough for you lot. ;)

It's not too difficult to do it in a scripting language or in a *NIX shell, , but it would be messy. Someone's probably done that.Well that's the thing - we're moving a script that runs in a program on Unix to the NT/2000 version of the program, and the script calls a Unix script to convert all filenames to lowercase. So we need a Windows version of that Unix script to be called from the moved script...

Does that make sense? :D

Mike.

gibler
21-02-2005, 09:18 PM
Something like rename (http://www.1-4a.com/rename/) should do it

Jeremy
21-02-2005, 09:43 PM
Lately I have been a big fan of creating .bat files with the help of excel. That should be able to automate it a *little*. I don't know of any specific tools for doing the job though. Write one :-P

Mike
22-02-2005, 07:57 AM
Something like rename (http://www.1-4a.com/rename/) should do itThanks gibler, but it doesn't appear to be able to be run from the command line?

Mike.

Mike
22-02-2005, 08:00 AM
Lately I have been a big fan of creating .bat files with the help of excel. That should be able to automate it a *little*. I don't know of any specific tools for doing the job though. Write one :-P I also do a lot of creating .bat files from excel, however the process needs to be completely automated, so adding that manual step wouldn't help much :) We will probably have to write something new to get it to work, but we were hoping someone might have already done it for us ;)

Mike.

Jeremy
22-02-2005, 08:41 AM
This looks like just the tool you could be after. http://zealsoftstudio.com/changecase/


It can search & rename files in subfolders. Supports Explorer drag & drop, command line and Windows Explorer context menu.

Graham L
22-02-2005, 02:05 PM
This is a script which runs in Unix to make all the filenames lowercase. That's presumably to make all filenames consistent because Unix is case-sensitive.

Have you considered that you might not need to do this in Windows. DOS/Windows used to be "accept any case for filenames, but convert to uppercase in the directories". It seems to now store the filenames in mixed case (as entered), but doesn't it still accept any case? If so, ... ;)

Of course, this is at the OS level. The programme might still be fussy ... but usually it is the OS level which causes the problem, rather than the application.

Mike
22-02-2005, 04:58 PM
(as entered), but doesn't it still accept any case? If so, ... http://www.pressf1.co.nz/images/smilies/wink.gif

Of course, this is at the OS level. The programme might still be fussy ... but usually it is the OS level which causes the problem, rather than the application.That's what I thought might be the case, but it hasn't been tried yet. The program that we're running the script on, however, was originally a Unix based program that has recently been ported to NT/2000, so it may not have picked up Windows' case handling in filenames. As we're still in the process of porting the script from Unix to Windows, we haven't yet been able to test whether it has or not.

Mike.