Manual page of Bren
Section: Bren man page (1)
Updated: 25 Sep 2023
Back to homepage
NAME
Bren - Bulk file renaming program for the shell
SYNOPSIS
bren [OPTIONS]
DESCRIPTION
Bren is a program for renaming multiple files at once. Bren is versatile
and offers support for post-rename scripting with GNU Guile. Bren runs
on the command line.
OPTIONS
- -p <path>
-
Set path where to look for files
- -b <name>
-
Set basename for the files
- -c <path>
-
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
EXAMPLES
Use default identifier:
bren -p /some/path/to/dir -b "basename"
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.
NOTES
When we talk about identifiers, we mean the part of the
new filename that is unique to each file. For example if
a directory contains files img656.jpg and img343.jpg,
running bren -p /path/to/the/directory -b "myphoto"
would rename the files to myphoto(1).jpg and myphoto(2).jpg.
When using -d option, please note that it uses file's last
modified date in format %Y-%m-%dT%H:%M:%S. It's possible
that some of the files you want to rename will have the same
last modified date. If that happens, only the first file
will be renamed and rest of them with the same date will
be skipped.
AUTHORS
Written by Niko Rosvall.
COPYRIGHT
Copyright (C) 2023 Niko Rosvall <niko@byteptr.com>
Released under license GPL-3+. For more information, see
http://www.gnu.org/licenses
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- NOTES
-
- AUTHORS
-
- COPYRIGHT
-
Generated: 20:29:17 GMT, September 27, 2023