Skip to content
Do file renaming using regular expressions. 使用正则表达式重命名文件.
Rust Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
src
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
LICENSE
README.MD
cli.yml

README.MD

ren3 Linux build status

Do file renaming using regular expressions.

Inspired by ren2

Install

cargo install ren3

Usage

USAGE:
    ren3 [FLAGS] <expression> [dir]...

FLAGS:
    -b, --brief             only display base name
    -D, --directory-only    only rename directories
    -F, --file-only         only rename files
    -f, --force             apply changes
    -h, --help              Prints help information
    -r, --recursive         rename subdirectories recursively
    -V, --version           Prints version information

ARGS:
    <expression>    sed-like expression
    <dir>...        directories to rename

Examples

> ls
foo-1.jpg foo2.jpg

> ren3 's/.*(\d+\.jpg)/bar-$1' -f
[OK] ./foo2.jpg      -> ./bar-2.jpg
[OK] ./foo-1.jpg     -> ./bar-1.jpg

> ls
bar-1.jpg  bar-2.jpg
You can’t perform that action at this time.