file-rename 's/^[^.]+\.//; s/\.[^.]+$//' ...
####
file-rename 's/^/sprintf "%02d. ", $NR/' ...
##
##
file-rename -Tutf8 '$_ = ucfirst' -f ...
##
##
file-rename 's/^/old-/' -N ../*
##
##
file-rename --rename=rotate-left file1 file2 file3 file4
##
##
file-rename --rename=rotate-right file1 file2 file3 file4
##
##
file-rename --rename=swap file1 file2 file3 file4
##
##
file-rename --rename=flip file1 file2 file3 file4
##
##
#!/usr/bin/env perl
=head1 NAME
file-rename - rename multiple files
=head1 SYNOPSIS
file-rename [OPTIONS] [[-e|-E CODE]*|CODE] [FILES]
=head1 DESCRIPTION
C renames the files according to the rule specified as
the first argument. The perlexpr argument is a Perl expression which
is expected to modify the $_ string in Perl for at least some of
the filenames specified. If a given filename is not modified by the
expression, it will not be renamed. If no filenames are given on the
command line, filenames will be read via standard input.
=head1 OPTIONS
=over 4
=item B<-h>, B<--help>
Outputs this help page.
=item B<-e> I, B<-E> I, B<--expr>=I
The code to be executed on filenames. It uses all the power by Perl and
supplies the mechanism for renaming files.
Each input filename is numbered with C<$NR>. It can be useful when file
numbering is required.
For example:
file-rename 's/^/$NR. /' ...
file-rename 's/^/sprintf "%02d. ", $NR/e' ...
When the B<-T> option is specified, the C<$ENCODE> and C<$DECODE>
variables are used internally for encoding and decoding the processed
file names. See the corresponding description below.
=item B<-M> I<[-]MODULE[=IMPORT]>
Load the module. It's almost similar to Perl's own option B<-M>.
It executes C