Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

xioren/rn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rn: r[e]n[ame]

features:

  • minimal
  • supports regex and glob
  • shallow (default) and recursive modes
  • hidden files safe (*nix)
  • collision/overwrite safe

usage:

usage: rn [options] this[ that]

options:
  -r, --recursive                 rename files recursively
  -R, --regex                     regex match
  -g, --glob                      glob match
  -d, --dry                       dry run

examples:
  rn "&" and
  rn -r copy
  rn -R "\s+" _
  rn --regex "(\d+)" "image-\$1"
  rn --glob --dry "*.jpeg" image

installation:

nimble install rn

notes:

  • for all modes except glob, leaving out the second argument ("that") simply removes the first argument ("this") from filenames, instead of replacing.