ok, here is an old script that I have made for automatic creation of a mix material between a diffuse and a glossy with several option, I think it should be useful also for your needs:
1. Choose the path for the diffuse channel, the name of the texture will be the name of the material.
1b. Is possible to add a suffix to the final name of the material.
2. If checked, the Transmission node is created based on the Diffuse texture, otherwise the transmission node stays black.
3. In the Opacity popup menu there are three options:
a. Alpha image, it is possible to specify a different path for the alpha image texture.
b. Grayscale image, useful if the alpha file is a separate jpg file.
c. Derive from diffuse, perfect if the diffuse texture has an alpha channel in it like png, tiff, tga.
d. if no path is selected, the material is opaque
4. It is possible to choose between bump and normal map, if no path is selected the bump map is derived by the diffuse map.
5. Is is possible to specify a path for the specular/roughness channels, if no path is selected the map is derived by the diffuse map.
* it is possible to directly invert the map, if needed.
After clicking to the "Create" button, you should have something like this:
And here is the node graph expanded to see how is made inside the material:
I hope you could find it useful