Merging Object

Hi everybody,
I had retrieve a map , environment, mesh etc from an other game engine,
And the only thing I can have is 3 huges FBX…
But now on the problem is that all the instance of the object became separate object, separate material et textures…
Its a big project, I start select all the similar object et material et replace reference but its very loooong list, is there a way to do that throught a script?

Thank you guys