Markdown Format | JSON API | MCP Server Tool
Rename a file or group of files with a `regex`.
rename 's/{{from}}/{{to}}/' {{*.txt}}rename -n 's/{{from}}/{{to}}/' {{*.txt}}rename 's/\.{{old}}$/\.{{new}}/' {{*.txt}}rename {{-f|--force}} 'y/A-Z/a-z/' {{*.txt}}rename {{-f|--force}} 's/\b(\w)/\U$1/g' {{*.txt}}rename 's/\s+/_/g' {{*.txt}} rename OLDNAME,NEWNAME
Changes the name of a file; an existing file NEWNAME will be
clobbered. Returns true for success; on failure returns false
and sets $!.
Behavior of this function varies wildly depending on your system
implementation. For example, it will usually not work across
file system boundaries, even though the system *mv* command
sometimes compensates for this. Other restrictions include
whether it works on directories, open files, or pre-existing
files. Check perlport and either the rename(2) manpage or
equivalent system documentation for details.
For a platform independent "move" function look at the
File::Copy module.
Portability issues: "rename" in perlport.
Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 20:34 @216.73.216.151 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)