Batch Renamers

Bren – bulk file renaming program for the shell

Bren is a program for renaming multiple files at once. Bren is versatile and offers support for post-rename scripting with Guile, but you do not need to use it, in order to rename files.

Bren runs on the command line. It’s simple and fast.

Simple example to use Bren:
$ bren -p "/path/to/a/directory/with/files" -b "myphoto"

This renames every file in given path using the basename. For example, if your directory has files img34324.jpg, img345435.jpg and img7667.jpg they would be renamed to myphoto(1).jpg, myphoto(2).jpg and myphoto(3).jpg.

Other examples:

Do not traverse into subdirectories and remove any file extensions:
$ bren -p /some/path/to/dir -b "basename" -t -e

Generate random, 8 characters long identifier:
$ bren -p /some/path/to/dir -b "basename" -r

Dry run:
$ bren -p /some/path/to/dir -b "basename" -r -D

After the rename operation, execute a GNU Guile script:
$ bren -p /some/path/to/dir -b "basename" -c /path/to/script.scm

Guile scripts must contain function (bren-bridge(filepath)). Bren looks for that and calls it after every file rename operation. Argument filepath is the path of the file that was renamed.

This is free and open source software.

Options:

-p Set path where to look for files
-b Set basename for the files
-c After renaming, execute a script pointed by the path, for each file
-e Remove extension from the files
-r Generate random, 8 characters long identifier
-t Do not traverse into subdirectories of the path
-d Use last modified date of the file as an identifier
-D Dry run. Run, but do not actually rename any files
-h Show short help and exit
-V Show version number of the program

Website: www.byteptr.com/bren
Support: GitHub Code Repository
Developer: Niko Rosvall
License: GNU General Public License v3.0

Bren is written in C. Learn C with our recommended free books and free tutorials.


Related Software

Console Batch Renamers
RnRSecurely rename multiple files and directories
F2Command-line batch renaming tool. Fast and safe to use. It's written in Go
vimvMass rename files using Vim
massrenRename multiple files using a text editor
mmvRename multiple files with editor
nominoBatch rename utility for developers
renameRename multiple files using Perl expressions
brenameBatch renaming safely
temprenTemplate-based file renaming utility
edirUtility to rename, remove, and copy filenames and directories
vidirEdit of the contents of a directory in a text editor
renameutilsFive programs – qmv, qcp, imv, icp and deurlname
rename-cliRename files quickly
renTakes find-formatted lines via standard input, and batch renames them
renuxRegex, placeholders, and text transformations
mooveManipulate file names and locations
BrenBulk file renaming software
brn2Fork of brn

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments