Basically replace your A4 above with the following 3 actions:
Variable Set [ Name:%new_name To:%jpeg(%rename) Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
Variable Search Replace [ Variable:%new_name Search:jpeg$ Ignore Case:Off Multi-Line:Off One Match Only:Off Store Matches In Array: Replace Matches:On Replace With:jpg ]
Move [ From:%jpeg(%rename) To:%new_name Use Root:Off ]
I've also attached the profile xml file in case anyone wants to use it.
Thank you again for helping getting it to work. Much appreciated.