I also created a simple python script to automate the process.
def replace_text(input_file, input0_file, list_file, output_file):
with open(input_file, 'r') as f_input, open(input0_file, 'r') as f_input0, open(list_file, 'r') as f_list, open(output_file, 'w') as f_output:
input_text = f_input.read()
input0_text = f_input0.read()
list_lines = f_list.readlines()
modified_text = input0_text.replace('XXXX.stp', list_lines[0].strip())
f_output.write(modified_text)
for line in list_lines[1:]:
modified_text = input_text.replace('XXXX.stp', line.strip())
f_output.write(modified_text)
print(f"Replacements completed. Modified text saved to {output_file}.")
# Replace the file paths with your actual file names
replace_text('input.txt', 'input0.txt', 'list.txt', 'output.txt')
The input0.txt has the 1st instance of the fresh mapkey, i think this is larger when compared to next instances. so i made it special.
The input.txt is the next instances of the particular list. ( so you have to record the mapkey for 2 or 3 creo files)
The list.txt has all the information about what the files are to be affected by this mapkey.
Both input.txt and input0.txt should have same replaceable instance. I used XXXX.stp. Also they both should have an empty line at end of the file, so that next instance will copy to the next line. list.txt shouldn't have any empty lines.
The output.txt consists the mapkey code from the second line. Open this and delete the last \ in order to end the mapkey. Now you can copy and paste to the previously created mapkey.
Enjoy.
I attach some files this worked for me.
Let me know if you have any comments.
Thanks.

