Making all files lowercase

J. Francois jlf@magusnet.gilbert.az.us
Sat, 18 Mar 2000 15:53:11 -0700


It seems like on Sat, Mar 18, 2000 at 03:32:18PM -0700, Rick Rosinski scribbled:
Orig Msg> I have billions of font files that I would like to change the names of -- to
Orig Msg> make all of them have lowercase letters instead of all caps.
Orig Msg> 
Orig Msg> Does anybody know of such a command that can do this for all of the files at
Orig Msg> once?  Thanks.
Orig Msg> 
Orig Msg> 
Orig Msg> -- 
Orig Msg> Rick Rosinski
Orig Msg> http://www.rickrosinski.com
Orig Msg> rick@rickrosinski.com
Orig Msg> 

First things first.

DISCLAIMER: This script may or may not work as intended.
            It is the responsibility of the user to back 
            up files. I make no claims as to the fitness 
            of this script for any use.

=================CUT HERE=====================
#!/bin/bash
#####################################
### Place this script in the directory
### containing the files to be converted
### from UPPERcase to lowercase names.
### It will create a temp directory
### and copy the files there with 
### lowercase names.
### Jean Francois - March 2000
#####################################
mkdir tmp
for i in `ls --color=no`
do
ORIG_FILE="$i"
NEW_NAME=`echo $i | tr [A-Z] [a-z]`
echo "Moving $ORIG_FILE to $NEW_NAME"
cp $ORIG_NAME tmp/$NEW_NAME
done
=================CUT HERE=====================

Jean Francois Sends...
President & CEO MagusNet, Inc.
MagusNet.com, MagusNet.Gilbert.AZ.US
CTO EBIZ Enterprises, Inc.
TheLinuxStore.com, TheLinuxLab.com, LinuxWired.net
480-778-1120 - Office
602-770-JLF1 - Cellular