Renaming multiple files en masse?
Paul Richards
paul at originative.co.uk
Thu Apr 13 19:01:20 BST 2000
Jeremy Prior wrote:
>
> # These shell loops are all well and good for quick hacks, but for real
> # finesse, you need to do the job properly - ie perl! :-)
> #
> # I've attached `move' - a program that allows you to apply perl
> # expressions to filenames.
> #
> # Just put it somewhere in you path, (optionally) create a link to `copy'
> # (for the equivalent cp behaviour), and then the above would simply be.
> #
> # % move chop *.html
> #
> # Although it's 50 lines long, only 38 are actual code, and 17 of those
> # are the usage message!
> #
> # Apart from a (possibly gratuitously and unnecessary) upgrade to
> # perl5, this script has served me well for nearly 10 years...
>
I've only just noticed this, but there's actually a "mmv" program in
ports/misc you might want to look at.
Paul.
More information about the Ukfreebsd
mailing list