Rename
Rename renames the filenames supplied according to the rule specified as the first argument. The argument is a Perl expression which is expected to modify the $_ string for at least some of the filenames specified.
Install / Use
/learn @pstray/RenameREADME
rename
Rename renames the filenames supplied according to the rule specified as the first argument. The argument is a Perl expression which is expected to modify the $_ string for at least some of the filenames specified.
History
This script has been on CPAN since sometime in the late 1990's. It is based on the original script written by Larry Wall, but has gotten additional feaures over the years. I was left out the index for a lot of years, but is visible again under the App::rename listing.
Features
- Rename files based on perl expressions manipulating $_.
- Verbosity, dry-run and interactive mode.
- Linking, copying or using a custom command instead of rename. Special option for working within git repos.
- Uses the same options and environment variables for file backup contol
as coreutils
cpandmv. - Creation of target directories when modifying file paths.
- Additional error checking, notably testing for 0-bytes in resulting file names.
- Parameter tab completion support for bash and zsh.
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
47PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
snap-vis-manager
The planning agent for the snap-vis project. Coordinates other specialized agents and manages the overall project roadmap.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
