Automatic import, group and export with command-line (CLI)
You could prepare a Blender file with a text block that contains the python script with all the command you need (import, convert materials name, export...).
Then you can type:

your/blender/path/blender -b blendertemplate.blend --python-text pythontextname