Skip to content

Using glob expressions with renamer

Lloyd Brookes edited this page Jul 17, 2018 · 2 revisions

Renamer comes with globbing support built in supporting the special characters described here.

For example, this command operates on all js files in the current directory:

$ renamer --find this --replace that "*.js"

This command operates on all js files, recursively:

$ renamer --find this --replace that "**/*.js"

this command operates on all js files from the lib directory downward:

$ renamer --find this --replace that "lib/**/*.js"

Bash users without globstar enabled will need to enclose the glob expression in quotes to prevent native file expansion, i.e. "**/*.js"