Skip to main content

A cross-platform bulk file renamer

Project description

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.

Installation

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

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

`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" in all files of the current directory.

`benamer -st /f`

`benamer --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/`

Project details


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.2.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

benamer-0.2.0-py2.py3-none-any.whl (3.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: benamer-0.2.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for benamer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5183028dbed11533fe18a07bde9380da502adbd0c94482e25afa1f018ca1478b
MD5 ec378ab4e897caa82eb50a55b8942170
BLAKE2b-256 aeb6c9fc33f0f2a7790024d135f8c0e56b71aaf4650b2f4a6be740e9a92c0528

See more details on using hashes here.

File details

Details for the file benamer-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: benamer-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for benamer-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 17d24ea873b82b49136e2b62d4b3a72cd5dbbaa305a85e652ec25159c116cdc4
MD5 d8f6e6569d8f1172bfb6498df297b2b2
BLAKE2b-256 b595b5be7d63e930860caab59f77bb48c9631be4b9f88327a7bc2f9547ff504b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page