lowercasing file names

Thomas Stivers stivers_t at tomass.dyndns.org
Mon Jun 14 12:38:52 EDT 2004

Hash: SHA1

On Jun 13 2004  6:54 PM, Joseph C. Lininger wrote:
> Hi all,
> I've got a directory structure which contains some uppercase characters in 
> the file names. I would like to lowercase every character in the name. Does 
> anyone know of a quick and easy way to do this? I could write a little 
> program to walk through the directory structure and take care of it, but 
> I'd rather not go to the trouble if there is already something out there 
> that can do it.

The perl package comes with a rename utility that works wonderfully for

  rename 'tr/[A-Z]/[a-z]/' *

  This utility can be used for any number of other transformations on
  filenames and it gives you all perl's pattern matching to work with.
  You could probably write the same utility in a matter of minutes, but
  there it is. I think it even handles collisions of names gracefully.

> Verification: 5eab38a77ac40416e075be8f50607ff7

Well I certainly want to get verified. :)

- -- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

Thomas Stivers	e-mail: stivers_t at tomass.dyndns.org
Version: GnuPG v1.2.4 (GNU/Linux)


More information about the Speakup mailing list