Batch File Renaming Script
Budget: $30 – $250 USD
I need a small script that will scan every file inside a chosen directory and rename each item in name order within the directory so it follows one clear naming convention.
Here is the convention I want to enforce:
• A user-editable prefix comes first (such as "COLO101" then a space
a next field with three numbers (such as 002) then no space
a next field with 2 numbers (such as 01), then a space
then a next field with a text string (such as "Colorado Alberts Falls").
the 2 number field should be indexed, so it is 01 for the first file, 02 for the second file, and so forth until the last file.
• Finally, the original file extension must remain untouched.
It should be written for a MAC, and I would like to be able to drop a folder on the script, have the script open, I enter the numbers in the fields, and then it renumbers. First it should show the proposed file name changes as a list, then I hit "go" to have it do the renumbering.
Core requirements
1. written in Python so I can run it anywhere with a single command would be nice
2. Ignores hidden files and keeps all original extensions intact.
I am flexible on the exact language or libraries you choose—Python’s pathlib / argparse, a Bash script that leverages rename, or otherwise.
Please let me know the language you prefer and how long you’ll need. A quick proof that the numbering and prefix/suffix pattern works on a sample folder will be the final acceptance test.
Purpose - I scan thousands of image files - and I would like to renumber those within a directory in this manner for long term identification. Renaming them by hand is very time consuming.
I would want a copy of the source code too.
Thanks.
Here is the convention I want to enforce:
• A user-editable prefix comes first (such as "COLO101" then a space
a next field with three numbers (such as 002) then no space
a next field with 2 numbers (such as 01), then a space
then a next field with a text string (such as "Colorado Alberts Falls").
the 2 number field should be indexed, so it is 01 for the first file, 02 for the second file, and so forth until the last file.
• Finally, the original file extension must remain untouched.
It should be written for a MAC, and I would like to be able to drop a folder on the script, have the script open, I enter the numbers in the fields, and then it renumbers. First it should show the proposed file name changes as a list, then I hit "go" to have it do the renumbering.
Core requirements
1. written in Python so I can run it anywhere with a single command would be nice
2. Ignores hidden files and keeps all original extensions intact.
I am flexible on the exact language or libraries you choose—Python’s pathlib / argparse, a Bash script that leverages rename, or otherwise.
Please let me know the language you prefer and how long you’ll need. A quick proof that the numbering and prefix/suffix pattern works on a sample folder will be the final acceptance test.
Purpose - I scan thousands of image files - and I would like to renumber those within a directory in this manner for long term identification. Renaming them by hand is very time consuming.
I would want a copy of the source code too.
Thanks.
Related categories:
Python
Debugging
Software Development
Regular Expressions
Programming
Scripting
Documentation
Automation
Bash
Script Writing