With unix you can not use
mv *.TXT *.txt, this is a unix command thinked with a dos backgound in   
mind ...

you will have to issue a mv command per file, but luckily you can do it   
automagically.
for that you need to write a script that translates one filename to the   
same but with extension lowercase
and run it through "find" to deal with the recursivity of the problem.

Here is a little script (attachment) that should help you.
run it through find like this:
find /mydir/where/i/need/this -type f -exec /tmp/translate {} \;
this will produce a list of "mv" command to issue to translate the   
filenames in the directory.
redirect this to a file and run it throug sh


This was not obvious ... you were right to ask.
Hope this [[ TRANS~PW.SH : 3875 dans TRANS~PW.SH ]]elps

pascal

   



 -----Original Message-----
From: Sean Conway [SMTP:[EMAIL PROTECTED]]
Sent: Sunday, May 30, 1999 10:51 PM
To: Linux newbie list
Subject: Changing the Case, Multi-Files

I was wondering if anyone knows how to change the case (e.g. from
 "test.TXT"
to "test.txt") on a large number of files, in several subdirectories.

I am only interested in changing the extension, from something in caps to
the same thing in lower case.

When I try to rename them (e.g. "mv *.TXT *.txt"), it says something   
like:
"when moving multiple files, the destination must be a directory"

Sorry if this is obvious, but I wasn't sure where to look in the
documentation.

I am running Redhat 5.2

Thanks.

Sean Conway

TRANS PW.SH

Reply via email to