file-rename
Perl regex-based file renaming
TLDR
Rename using Perl expression
SYNOPSIS
file-rename [options] expression [files...]
DESCRIPTION
file-rename (also known as rename or prename) renames multiple files using Perl regular expressions, providing powerful pattern-based transformation capabilities. Unlike simple mv operations, it can apply complex substitutions, case conversions, and pattern matching across multiple filenames simultaneously.
The tool supports the full Perl regex syntax including capture groups, look-ahead/look-behind assertions, and transliteration operations. Common uses include batch renaming, removing or replacing characters, changing file extensions, and standardizing filename formats.
file-rename's dry-run mode (-n) allows preview of changes before execution, preventing accidental destructive operations. The force flag (-f) enables overwriting existing files when name collisions occur.
PARAMETERS
-n, --no-act
Dry run, show what would happen.-v, --verbose
Print names of files renamed.-f, --force
Overwrite existing files.
CAVEATS
Multiple implementations of rename exist. This documents the Perl version (prename), not the util-linux version.
