Rename imagepairs in folder

Hello,

I have a list with filenames ( {“filename1”, “filename2”, “filename3”, “filename4”}).
Now I want to select a folder and rename files in the folder getting the new names from the list of filenames.
Its always 2 Pictures (count of Images is twice the count of filenames) that belong together (the first a front, the second a back). The script should step through all files and name them like

filename1_front.jpg
filename1_back.jpg
filename2_front.jpg
filename2_back.jpg

etc

until all files are named

As you probably see I am a newbie when it comes to AppleScript.

Thanks a lot
Marc