README
Rename
A simple and safe command-line renaming utility using JavaScript regular expressions.
Prevents renaming collisions and overwriting existing files. Checks for collisions between input files before beginning to rename them, so you don't end up with a dirty directory.
No runtime dependencies outside of Node.js >=v8.
Installation
$ npm install -g safe-rename-cli
The executable is aliased to rename
and rename.js
.
Usage
rename.js [OPTION]... PATTERN REPLACEMENT FILE...
-h, --help Show this help.
-v, --verbose Print extended information.
-d, --dry-run Don't modify any file.
-C, --ignore-collisions Force rename on collision conflicts.
-S, --skip-problematic Continue renaming non-problematic files instead of stopping on errors.
Examples
The syntax is similar to calling String#rename
in JavaScript.
$ ls
foo.jsx bar.jsx bazjsx
$ rename '\.jsx