Batch file rename tool
Project description
Barenames
Commandline tool for batch renaming files using regular expressions.
Usage
Usage: barenames [OPTIONS] PATTERN REPLACEMENT
Batch file rename tool with regex substitution.
Example:
barenames "myfile-(\d+)" "yourfile-\g<1>"
Options:
--dir PATH Directory to perform actions in (default: current
working directory)
--preview / --no-preview Show preview of renames with confirmation prompt.
-r, --recursive Search files to rename recursively
--help Show this message and exit
Barenames uses regex to change file names, which is very powerful tool.
But power comes with responsibility, it is adviced to use --preview
option to
view what program is gonna do, before it does it, cause with regex you never truly know....
Change file extension:
This example changes extension of all .md
files in
current working directory to .rst
barenames --preview "(?P<filename>.+)\.md" "\g<filename>.rst"
If your files are not in current working directory just pass
--dir
option to override dir.
barenames --dir ~/my-notes/ --preview "(?P<filename>.+)\.md" "\g<filename>.rst"
If you wish to rename files in subdirectories too, use --recursive
or -r
for short.
barenames --recursive --preview "(?P<filename>.+)\.md" "\g<filename>.rst"
Use this option with caution though.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file barenames-0.1.1.tar.gz
.
File metadata
- Download URL: barenames-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3820d79918bbbc0ad28cd83499bfd77b1c6419008a384d0b17616f8b34afba8 |
|
MD5 | e891a4276d1db9df3207e39e0cb536c0 |
|
BLAKE2b-256 | e7bc0f7708a6a82749fb2b01167e7bbb348cb42bdd63b5640437e3da1bac910f |
File details
Details for the file barenames-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: barenames-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de526fedc4b708a85623b21a5fcfe02f6e1fbe5d623ccd5e06f94eb99e49f41f |
|
MD5 | 1e92fb6336e0ca82a74656d754cd6770 |
|
BLAKE2b-256 | df45e8897344d0a8b19afb0b1217b763a7630ac04ce2650f16e49f924b2be24f |