Re: how to rename multiple files
On Mon, Dec 09, 2002 at 03:03:10PM -0500, drew cohan wrote:
> How do I rename all files in a directory matching the pattern *.JPG to
> *.jpg in a bash shell script? Thanks to you guys I can check for the
> existence of jpgs in a directory, but can't seem get 'mv' to rename them
> for me (always complains that the last argument must be a directory).
Either what Craig said, or one of:
# apt-get install mmv
$ mmv \*.JPG \#1.jpg
$ rename 's/\.JPG$/.jpg/' *.JPG
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: