CategoryComputingTips > PerlCompTips

Perl Tips

Oneliners

Documentation

rename

rename is bundled with perl and installed in all good perl installs :)

It's really useful as the syntax is

Usage: rename [-v] perlexpr [filenames]

So renaming multiple files according to a pattern becomes suddenly easy.

rename 'tr/A-Z/a-z/' *

rename 's/\.foo$/.bar/' *

TheEarthWiki: PerlCompTips (last edited 2008-02-19 15:39:14 by localhost)