brename

Safe batch rename files using regular expressions

brewmacoslinux
Try with needOr install directly
Source

About

Cross-platform command-line tool for safe batch renaming via regular expressions

Commands

brename

Examples

Rename all .txt files to .md extension$ brename -r '\.txt$' -R '.md' *.txt
Remove 'test_' prefix from multiple files$ brename -r '^test_' -R '' test_*.jpg
Replace spaces with underscores in filenames$ brename -r ' ' -R '_' *.pdf