[ale] script or app to set all files to lower case

Michael B. Trausch mike at trausch.us
Mon Aug 27 20:46:32 EDT 2007


James Taylor, on 08/27/2007 08:13 PM said:
> I need to convert a volume with several hundred thousand files with
> mixed case file names to all lower case.
> 
> Any suggestions for a quick, fast and easy utility to accomplish
> this? -jt
> 

For GNU systems (which I assume you are using), and to keep a log, just
in case:

find . | while read OldName; do
	NewName=`echo $i|tr [A-Z] [a-z]`
	mv -v "$i" "$NewName"
done

Should work with other nasty characters, too, like spaces.

	-- Mike

-- 
Michael B. Trausch               Internet Mail & Jabber: mike at trausch.us
Phone:  (404) 592-5746 x1                         http://www.trausch.us/
Mobile: (678) 522-7934             VoIP: 6453 at sip.trausch.us, 861384 at fwd
Pidgin 2.1.1 and plugins for Ubuntu Feisty! http://www.trausch.us/pidgin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature




More information about the Ale mailing list