[Malvern] One for the Perl-mongers.

Angus Clarke post at angusclarke.com
Sun Jul 15 19:08:29 BST 2007


I havent tried it but a little script like this should work:

<-- snip
#! /bin/bash

DIR=/dir/to/files   # Change this!

cd ${DIR}
for FILE in `ls`
do
  NEWNAME=`echo ${FILE} | tr [:upper:] [:lower:]`
  echo "Renaming ${FILE} to ${NEWNAME}"
  mv ${FILE} ${NEWNAME}
done
<-- snip

Regards
Angus

Geoff Bagley wrote:
>
> I have a number of .jpeg file ( photographs etc.),  and would like to 
> convert the file names
> of the whole lot to lower case.
>
> Currently some are both .jpg and .JPG,  and both  img_ and  IMG_   and 
> the same files are
> stored more than once.   The files all come from various sources who 
> use differing standards.
>
> Storing very large files (like photos) is very wastful of space.
>
> A quick steer to the correct page of the (RT)FM would be appreciated.
>
> Geoff.
>
>
> _______________________________________________
> Malvern mailing list
> Malvern at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/malvern





More information about the Malvern mailing list