Rename files in batch while keeping their index. This script's only goal is to save copy-paste time when renaming a batch of files.
-
Clone it and make the script file executable on Linux.
chmod +x batch-renamer
-
Run ./batch-renamer and provide the five necessary parameters:
- Index character that represents the digits
- Original file pattern, including index characters
- Processed file pattern, including index characters
- Index start
- Index end
Usage example:
./batch-renamer XXX originalXXX.txt processedXXX.txt 15 23
This will batch rename all files with filenames like originalXXX.txt to processedXXX.txt where XXX are digits between 015 and 023.