downcasefilenames

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: Renaming files ...
From: Harry Putnam <reader@newsguy.com>
Date: Sun, 25 Jul 1999 17:13:41 -0700


On Sun, Jul 25, 1999 at 07:56:11PM -0400, Duncan Hill wrote:
> On Mon, 26 Jul 1999, Bob M Brown wrote:
> 
> > INDEX.HTML
> > MAIN.GIF
> > CONTACT.HTML
> > 
> > What command can I use to rename them to:
> > 
> > index.html
> > main.gif
> > contact.html
> 
> Simple shell based way, assuming that no files have spaces in the
> name:
> 
> $ for file in `ls` ; do mv $file `echo $file | tr A-Z a-z` ; done
> 
> Or something so.. replace the do mv with just  
> do echo $file | tr A-Z a-z
> to make sure that it works.

Easily  done in emacs "dired" mode

open emacs then C-x d (open a directory in dired mode)
Mark the files with "m" then press `% l'  (percent lowercase l)

You can do the marking with regular expression too if you have lots to do.


===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu