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).
>
another way:
find <dir> -name '*.JPG' | xargs -iAAA basename AAA .JPG | xargs -iAAA mv \
AAA.JPG AAA.smth
Reply to: