[ale] quick way to rename all files ?
Byron A Jeff
byron at cc.gatech.edu
Mon Aug 27 00:07:00 EDT 2001
>
> Wow! Thanks! That worked like a charm!
Glad you liked it.
BAJ
>
> - Gary
>
>
> Byron A Jeff wrote:
> >
> > >
> > > Is there a quick way to rename all files in a directory to lower case?
> > > Same filename, just rip through and make sure they are all lowercase.
> >
> > This should work for bash:
> > ------------------------------------
> > for i in * ; do
> > lc=$(echo $i|tr [A-Z] [a-z])
> > if [ $lc != $i ] ; then
> > if [ -f "$lc" ] ; then
> > echo "$lc already exists"
> > else
> > mv $i $lc
> > fi
> > fi
> > done
> > -----------------------------------
> >
> > Just tested it. Seems to work. Hope it helps,
> >
> > BAJ
> > --
> > To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
>
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list