Script or automation to change part of a file name
My apologies for making my first post a question, rather than a reply. I am trying to write or find a script that will allow me change the case of only part of a file.
Scenario:
I receive pdfs from a webform. The files are renamed automatically (via Hazel) to include 7 characters at the beginning, followed by a series of characters some of which end up being in uppercase.
eg: PP4-567_EDWARD&Amelia.pdf or PP4-567_EDWARD&AMELIA.pdf or PP4-567_Edward&AMELIA.pdf
Outcome:
In this instance I'd want to change EDWARD to Edward, without changing the 'PP' at the beginning of the filename. And of course, sometimes the second name "Amelia" is in uppercase instead or as well.
Question:
Is there a way to do it?
Where I am at:
Could it be done with Automator (watching a folder), or some other way? I could use Keyboard Maestro, but that seems like overkill for something that happens only sometimes. I could just do the changes by hand, but often a problem file comes in when I'm not at my mac, so automating this is important to me.
I've tried on my own (scripting skills are minimal), searched the web for help (can't choose between AppleScript, python, java or even know the best option). Am willing to learn and search more, and would appreciate pointers, since I'm already confused and discouraged enough!
Thanks for even looking at this request!
Cheers
Joss
iMac Pro