in reply to batch rename with a 1 liner

Not a perl solution, but...

If you use bash, you may find the following solution workable:

$ for i in *.html; do mv $i U${i#new}; done

See the BASH FAQ (section D3) for more.

Replies are listed 'Best First'.
Re: Re: batch rename with a 1 liner
by DrHyde (Prior) on Oct 08, 2003 at 08:52 UTC
    Or cutting out bash-specific stuff:
    for i in *.html; do mv $i `echo $i|sed 's/unwanted/replace/'`; done
    I recommend putting an echo between the do and mv first to make sure it's doing what you expect.

    Will need further work if you have whitespace in filenames.