Will Maier | 27 Jun 14:54

Re: Rename multiple files at once

On Wed, Jun 27, 2007 at 02:37:07PM +0200, Pieter Verberne wrote:
> How do I rename multiple files at once?

This is a function of your shell, not mv. See ksh(1), zsh(1), etc...

Alternatively, you could write a simple script/function to address
the same problem:

    for FILE in *jpg; do
        NEW=$(echo $FILE | sed -e 's/\.jpg$/_thumb.jpg/')
        mv "${FILE}" "${NEW}"
    done

--

-- 

o--------------------------{ Will Maier }--------------------------o
| web:.......http://www.lfod.us/ | email.........willmaier <at> ml1.net |
*------------------[ BSD Unix: Live Free or Die ]------------------*


Gmane