Automatically apply materials to massive amount of mesh

I’m doing a project with lot of mesh and it own material (about 1000 in the scene),each mesh and its material has same specific filename

is there any possible to this make process(apply materials to mesh) automatically ?