File::Rename (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
File::Rename - Perl extension for renaming multiple filesSYNOPSIS
use File::Rename qw(rename); # hide CORE::rename rename @ARGV, sub { s/\.pl\z/.pm/ }, 1; use File::Rename; File::Rename::rename @ARGV, '$_ = lc';
DESCRIPTION
- rename( FILES, CODE [, VERBOSE])
-
rename FILESusingCODE,ifFILESis empty read list of files from stdin
- rename_files( CODE, VERBOSE, FILES)
-
rename FILESusingCODE
- rename_list( CODE, VERBOSE, HANDLE [, FILENAME])
-
rename a list of file read from HANDLE,usingCODE
OPTIONS
- FILES
- List of files to be renamed, for "rename" must be an array
- CODE
- Subroutine to change file names, for "rename" can be a string, otherside a code reference
- VERBOSE
- Flag for printing names of files successfully renamed, optional for "rename"
- HANDLE
- Filehandle to read file names to be renames
- FILENAME(Optional)
-
Name of file that HANDLEreads from
HASH
Either CODE
or VERBOSE
can be a HASH
of options.
If
CODE
is a HASH, VERBOSE
is ignored
and CODE
is supplied by the _code key.
Other options are
- verbose
-
As VERBOSEabove, provided by -v.
- no_action
- Print names of files to be renamed, but do not rename (i.e. take no action), provided by -n.
- over_write
- Allow files to be over-written by the renaming, provided by -f.
- show_help
- Print help, provided by -h.
- show_manual
- Print manual page, provided by -m.
- show_version
- Print version number, provided by -V.
EXPORT
None by default.
ENVIRONMENT
No environment variables are used.SEE ALSO
mv(1), perl(1), rename(1)AUTHOR
Robin Barker <RMBarker@cpan.org>Acknowledgements
Based on code from Larry Wall.Options -e, -f, -n suggested by more recent code written by Aristotle Pagaltzis.
DIAGNOSTICS
Errors from the code argument are not trapped.COPYRIGHT AND LICENSE
Copyright (C) 2004, 2005, 2006, 2011 by Robin BarkerThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.