Project

renamr

0.0
A long-lived project that still receives updates
Renamr normalizes file and directory names. It rewrites them with lowercase English letters, digits, and hyphens in place of spaces and other symbols.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 1.15
 Project Readme

Renamr

rake rubocop gem version code style hits of code license

  • About
  • Installation
  • Updating
  • Usage
  • Example
  • License

About

renamr normalizes file and directory names. It rewrites them with lowercase English letters, digits, and hyphens in place of spaces and other symbols.

Installation

The tool runs on macOS, GNU/Linux, and other Unix-like operating systems, as well as Windows. It is packaged as a Ruby gem and requires Ruby 3.2 or later. If your platform lacks a suitable Ruby, see Installing Ruby.

Install the gem with:

gem install renamr

Updating

Update the gem with:

gem update renamr

Usage

renamr [options]
  -a, --act              Performs actual renaming.
  -c, --cut pos,len      Removes len characters starting at pos.
  -d, --dir dir          Directory to process.
  -l, --lim              Limits file name length.
  -m, --mod              Prepends file modification time.
  -p, --prepend str,beg  Prepends a string.
  -r, --rec              Processes directories recursively.
  -s, --src src          String to replace.
  -t, --dst dst          Replacement string.
  -v, --version          Shows the version.
  -w, --wid wid          Output table width.

Example

renamr -d <source>

This previews new names for all files in source using the default character set: the 26 English letters, 10 digits, and hyphens in place of spaces and other symbols. Adding -a performs the actual renaming.

License

renamr is copyright David Rabkin and is available under the Zero-Clause BSD license.