[ale] quick way to rename all files ?
Byron A Jeff
byron at cc.gatech.edu
Sun Aug 26 22:16:24 EDT 2001
>
> 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.
More information about the Ale
mailing list