hi,
here is one of the solutions,
you can use maya in its batch mode,
just type , mayaBatch -prompt , on run window,
it will open maya in command line with mel: prompt,
so now you can enter any MEL command in it,
for example, you can open any file with file -open and then list shader with ls command,
now to make it automate you will have to use this,
-
mayaBatch -file someMayaFile.mb -command “someCommand”
this will run your MEL command “someCommand” in you someMayaFile.mb without opening maya,
-
you can make a batch file of this command , and make another batch file which will call first one with multiple no. of files,
example to make this clear,
here I made 2 batch files and a mel file,
what this will do is open all .ma files from specified directory and delete a scriptNode from it and save it,
here is how to do:
first batch file,
props.bat
@ECHO OFF
SET path=“D:\Vishang Shah rash\props”
cd
d:
cd
cd %path%
FOR %f IN (*.ma) DO CALL batDelUI %f
this will look for all .ma files and run batDelUI for it,
batDelUI.bat
@echo off
echo Deleting uiConfigurationScriptNode for %1
mayaBatch -file %1 -command “source delUIConfig”
echo Deleting uiConfigurationScriptNode ended for %1
this will take .ma files transfered from props.bat and will run delUIConfig.mel command for each file,
so you can replace it with the mel file you have for assigning shader.
copy that mel file in maya/scripts directory
and put all your .ma files in one directory and specify it in props.bat,
so when all set, just go to command line and run props, and you are done,
for more reference on DOS batch programming ,
http://www.allenware.com/icsw/icswidx.htm
only thing is you can not have GUI for this, but for that you can take advantage from TCL or Python or Perl,

Vishang Shah