Skip to main content

benamer

Bulk renamer with intuitive (no regex) options.

Getting Started

In order to run this software, you need Python, it does not matter what version (provided it is updated enough), benamer will only run in Python 3, though.

Installation

You can use pip in order to retrieve the package from PyPI: pip install benamer.

Then, you can directly invoke it as benamer [args...], or as python -m benamer [args...], depending on your installation of Python.

Usage

benamer.py [-h] [-d DIR] [-as RPREFX] [-ac START] [-rs RSUFX] [-ap RPREFX] [-rp RPREFX] [-fe FILTER_EXT] [-fp FILTER_PREFIX] [-fs FILTER_SUFFIX] [-st SUST] [-e EXT] [-rsp] [-s] [-p] [-jd] [-jf] [-u] [-l] [-v]

Use benamer -h to get a complete list of available options. The availabe operations at the time of writing are:

-    -h, --help show this help message and exit
-    -d DIR, --dir DIR set the directory to work with
-    -as RPREFX, --add-suffix RPREFX add suffix to name
-    -ac START, --add-count START add count suffix to name
-    -rs RSUFX, --remove-suffix RSUFX remove suffix in name
-    -ap RPREFX, --add-prefix RPREFX add prefix to name
-    -rp RPREFX, --remove-prefix RPREFX remove prefix in name
-    -fe FILTER_EXT, --filter_by_ext FILTER_EXT filter by extension
-    -fp FILTER_PREFIX, --filter_by_prefix FILTER_PREFIX filter by prefix
-    -fs FILTER_SUFFIX, --filter_by_suffix FILTER_SUFFIX filter by suffix
-    -st SUST, --sust SUST substitute string
-    -e EXT, --ext EXT substitute extension
-    -rsp, --replace-spaces replace spaces in files with underscores
-    -s, --sort sort files before renaming
-    -p, --print do nothing, just show renamings
-    -jd, --directories rename only directories
-    -jf, --files rename only files
-    -u, --upper uppercase file names
-    -l, --lower lowercase file names
-    -v, --verbose describe what I am doing

Examples

Adding a prefix

The following command will show the effects of adding a prefix to all files in the current directory. Nothing will be actually changed, due to the use of the -p option.

benamer -p -ap file_

benamer --print --add-prefix file_

Adding a prefix

The following command will add a prefix to all files in the current directory.

benamer -ap file_

benamer --add-prefix file_

Adding a count suffix

The following command will add a suffix with a count to all files in the sub subdirectory.

benamer -ac 1 -d sub

benamer --add-count 1 --directory sub

Replacing a part of the name

The following command will replace all "er" with "ar" in all files of the current directory.

benamer -st er/ar

benamer --sust er/ar

Replacing the whole file name

The following command will replace the whole file name with "f" and a number, in all files of the current directory. The original order will be respected.

benamer -s -ac 1 -st /f

benamer --sort --add-count 1 --sust /f

Remove a part of the file name

The following command will remove the "er" part of the file name in all files of the current directory.

benamer -st er/

benamer --sust er/

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benamer-0.3.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benamer-0.3.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file benamer-0.3.0.tar.gz.

File metadata

  • Download URL: benamer-0.3.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for benamer-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6d5b9ee865f0593ba6f59d30441c683e7e2dbe23bea850abd62146438a011beb
MD5 0ba5e3a6a6dca8d60a7b3cdad1dbbcca
BLAKE2b-256 07e7f3d1ea0b512dd0d9554fd9857eda858fb79816a562fe5f17e48d343b9ee2

See more details on using hashes here.

File details

Details for the file benamer-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: benamer-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for benamer-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 124f3cf1eaec99b031cdc9c216a2f71db891487604e6a9504dcd5ffa5e585366
MD5 0de720df15acbb7494a6a2215adb7975
BLAKE2b-256 c9871f68a307e9d18aa62f21bcdbbaf4457a7465ec64f13796d3892ddec87153

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page