List replace if contains

Hi, I’m trying to rename some files already created with new names from a list.
Basically i need to change the old name but with a prefix of 3 number based on the contract order, the two lists are not the same length or the same order, because the first one is extracted from actual documents and the second one is based on the contract schedule.
Is there any way to compare and replace if the list above contains the string from the one bellow?,
Actual name 52-01-01-C.pdf
New name 100-52-01-01.pdf

I’m stuck, i try with no luck.

What controls the prefix value? For example, does the C make the value 100?

Here is how to rename files:

Connect the old file names (incuding the path) in “path” and the new file names in “newPath”

This value is almost arbitrary, defined by the order in witch each sheet appears in the contract :confused: , the suffix is always a letter witch indicates de revision of the sheet.
I can easily create the list with the new names but i have no idea how to match those two lists and replace the old names with the new names, i could try to sort the two lists in a way that match i think but they will be changing has te project advance and i will like to make some kind of “find and replace system” to avoid future mistakes.

thanks, that could help me!:slight_smile:
I find this:

I ask for the dyn to battlebim, i think he has the solution, is a different approach but it’s watt i’m looking for