Hi Guys,
I used the suggestion from XX above:
rename -E 'y/A-Z/a-z/' -E 's/(^|[\s_-])([a-z])/$1\u$2/g' *
This works great, except - it lowercases (if I can invent a word) a letter in the middle of a text string containing numbers such as:
CoMpany - X01B02 - LETTER.txt
becomes:
Company - X01b02 - Letter.txt
Is there any way top amend that one line command to avoid the 'B' in the middle of the reference getting changed to 'b' so that, instead, it comes out as:
Company - X01B02 - Letter.txt
I am guessing we need to look for a letter, not being the first character of a word, sandwiched between two numerals, but by RegExp fu is just not up to it!
If it helps, we can assume it is only ever a single letter with a numeral immediately left and right of it.
Thanks,
Alan.