batch_rename

This gem provides a CLI command:

batch-rename

to bulk rename files in Linux or macOS using an interactive text editor.

Background

This gem was inspired by a question from StackExchange user Yuriy Babenko in June 2015 where they asked whether there was an OS X app/way to batch rename files via a purely text interface.

System requirements

  • This gem has been tested on macOS and Linux only.

  • The gem depends on DiffMerge to be installed, a visual diff editor developed by SourceGear. See the next section for details.

Installation

  1. First, make sure you have DiffMerge installed. You can either download it from SourceGear’s website or search your system package manager for diffmerge.

  2. Install the gem:

gem install batch_rename

Usage

  1. Open your terminal.

  2. cd to the directory whose content you want to rename.

  3. Enter the command:

batch-rename

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/claui/batch_rename.

Credits

The idea for batch_rename was taken from a question by Yuriy Babenko on apple.stackexchange.com.

This gem depends on the software DiffMerge to be installed, a product from SourceGear, LLC.
SourceGear, LLC has no connection to batch_rename or to its author whatsoever. In particular, they do not endorse batch_rename or its usage.

A separate license agreement for DiffMerge can be found on SourceGear’s website.

License

Copyright (c) 2015 – 2022, Claudia Pellegrino

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.