Easily rename multiple files ending with incrementing numbers.
Project description
multi-rename
A python module for renaming multiple files in a directory to a common format ending in incrementing numbers.
Installation
Install using pip:
pip install multi-rename
Usage
from multi_rename import renamer
# Full Rename
renamer.full_rename(dir_path='/path/to/dir/here', new_name='new_file_name')
# Add prefix
renamer.add_affix(dir_path='/path/to/dir/here', affix='prefix_to_add', affix_type='prefix')
# Add suffix
renamer.add_affix(dir_path='/path/to/dir/here', affix='suffix_to_add', affix_type='suffix')
Example
renamer.full_rename('/home/test_imgs/','newname')
This will make all the files in the directory to be renamed as:
newname1.jpg
newname2.pdf
newname3.png
...
Contributing
If you have any bug fixes / useful feature additions, feel free to fork this repository, make your changes and drop in a pull request.
License
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
multi-rename-0.0.2.tar.gz
(2.8 kB
view hashes)