[Techtalk] Uppercase to lowercase

Akkana akkana at shallowsky.com
Wed Dec 4 18:39:24 EST 2002


Phil Savoie writes:
> Was wondering if anyone had a script they would like to share to convert 
> upercase filenames to lowercase?

Here's mine (csh).

	...Akkana
-------------- next part --------------
#! /bin/csh -f

# Translate filenames to lower case,
# since Windows programs always seem to want to make them upper case.

foreach fil ( $* )
  set newfil = `echo $fil | tr '[A-Z]' '[a-z]' `
  if ($newfil != $fil) then
    mv $fil $newfil
  endif
end


More information about the Techtalk mailing list