tl.rename /

Filename Size Date modified Message
436 B
2.0 KB
1.9 KB
198 B
1.6 KB


tl.rename is a rename implementation that does more than substring or regular expression replacement. Planned file name transformations include:

  • substring replacement as in Gentoo's rename implementation, for example
  • regular expression replacement as seen in Debian's rename implementation
  • reading the new names from a file or standard input
  • various case transformations
  • additional regex replacements inserting formatted counters
  • interactive renaming using readline, if available
  • interactive renaming using an external text editor

Version 0.1 implements reading names from a file or standard input, case transformations, simple substring replacement and interactive renaming using readline.


rename [options] [file paths]

File paths may contain directory paths and be either absolute or relative to the current working directory. The specified files do not need to exist when rename is called but will cause it to fail if they do not exist when the actual renaming is being done.


-h, --help show this help message and exit
-d, --debug debug mode, do not catch Python exceptions
-D, --dry-run dry-run mode, do not touch the file system
-n NAMES_FILE, --names-file=NAMES_FILE
 file with new names, or - for standard input
-c CASE, --case=CASE
 turn the file name to upper, lower, or sentence case
-r FROM TO, --replace=FROM TO
globally replace first option argument with second, may be given multiple times
-i, --interactive
 edit names interactively


This package is written by Thomas Lotze. Please contact the author at <> to provide feedback, suggestions, or contributions.

See also <>.