numerator
Script that automatically renames files, so they get equally zero left padded names.
Usage
Imagine you have this folder:
PS C:\test> ls
Directory: C:\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 16.12.2022 15:17 0 file-090.jpg
-a--- 16.12.2022 15:17 0 file-1.jpg
-a--- 16.12.2022 15:17 0 file-100.jpg
-a--- 16.12.2022 15:17 0 file-5.jpg
-a--- 16.12.2022 15:17 0 file-80.jpg
-a--- 16.12.2022 15:17 0 info.txt
And you want all files named "file-XXX.jpg" (except for the "info.txt").
Checking possible renames without actual changes:
pip install numerator
cd C:\test
numerator --dry-run
Renaming 6 files to padding 3
"C:\test"
1. Planning to rename 'file-1.jpg' to 'file-001.jpg'
2. Planning to rename 'file-5.jpg' to 'file-005.jpg'
3. Planning to rename 'file-80.jpg' to 'file-080.jpg'
Actual renaming operation:
cd C:\test
numerator
Renaming 6 files to padding 3
"C:\test"
1. Renamed 'file-1.jpg' to 'file-001.jpg'
2. Renamed 'file-5.jpg' to 'file-005.jpg'
3. Renamed 'file-80.jpg' to 'file-080.jpg'
Contents of the folder after execution:
PS C:\test> ls
Directory: C:\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 16.12.2022 15:17 0 file-001.jpg
-a--- 16.12.2022 15:17 0 file-005.jpg
-a--- 16.12.2022 15:17 0 file-080.jpg
-a--- 16.12.2022 15:17 0 file-090.jpg
-a--- 16.12.2022 15:17 0 file-100.jpg
-a--- 16.12.2022 15:17 0 info.txt
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
numerator-1.0.1.tar.gz
(5.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file numerator-1.0.1.tar.gz.
File metadata
- Download URL: numerator-1.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c9ec0de93745aefc886f6f643378007949d4693185ab7122d3a9450e501df3
|
|
| MD5 |
458dd6daca63827280933d2315d49716
|
|
| BLAKE2b-256 |
d3f982a7ebbfbc3a382ffd5f3c856257c1af6446b7645f3bba053a4b9fc59b98
|
File details
Details for the file numerator-1.0.1-py3-none-any.whl.
File metadata
- Download URL: numerator-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0025dfd1f60c81eebe7ad78746197a594da8603377a7c377c797cb407ebb43
|
|
| MD5 |
f083cd752b772618576ff9c9836db843
|
|
| BLAKE2b-256 |
afcb66bc09e48cb20ca5ad65ab9a5c08619e30bc364d3da91a5b611b7d69da98
|