zmv
Batch rename files using zsh patterns
TLDR
Rename files lowercase to uppercase
SYNOPSIS
zmv [-finqQsvwW] [-C|-L|-M|-p program] [--] srcpat dest
DESCRIPTION
zmv is a Zsh builtin for batch renaming files using pattern matching and replacement. It's more powerful than basic mv for complex renaming operations.
The source pattern uses Zsh extended globbing. Parenthesized groups are captured and available as $1, $2, etc. in the destination pattern. Zsh parameter expansion modifiers can transform captured text.
Common modifiers: ${(U)1} uppercase, ${(L)1} lowercase, ${(C)1} capitalize, ${1:t} tail (basename), ${1:h} head (directory).
zmv must be loaded first: autoload -U zmv
PARAMETERS
-n
Dry run, show what would be done-f
Force overwrite without prompting-i
Interactive, prompt before overwriting-q
Quiet, don't report errors-Q
Force bare glob qualifiers on pattern-s
Symbolic link instead of move-v
Verbose, print each command-w
Pick out wildcard parts of pattern-W
Same as -w but with pattern replacement-C
Copy instead of move-L
Hard link instead of move-M
Move (default)-p program
Use specified program instead of mv
CAVEATS
zmv is Zsh-specific. It won't work in bash or other shells.
Always use -n (dry run) first to verify the operation before executing.
Patterns use Zsh globbing, which differs from regular expressions. Enable extendedglob (**setopt extendedglob**) for full pattern support.
