Auto-replace clip and export video

I need to edit more than 100 vídeos that are different. Each video has 3 parts, 2 of them are the same but one changes on each one. So if there is some script that auto-replace this different clip from a folder and export automatically, it would be great!
Thanks for help!