Example: To Batch Export Objects from a Series of MAX Files

Running the following batch file exports all objects out of a series of 3ds Max files on a file server using 3ds Max and MAXScript.

The export.ms file:

exportFile (maxfilepath + maxfilename + ".obj") #noPrompt using: Wavefront_ObjectExporterPlugin

The batch file:

rem begin batch filedir
\\fileserver\maxfiles\*.max /s /b >c:\fileslist.txt
c:
cd "\Program Files\Autodesk\3ds Max 2010"
cmdjob -jobname "batch export objects from max files" -manager managername -tasklist c:\filelist.txt 3dsmax.exe %%tp1 -U MAXScript \\fileserver\scripts\export.ms
rem end batch file

The second line of the batch file (dir) writes out the list of files to fileslist.txt (see the image below). This text file is used as the tasklist. In the cmdjob line, the –taskname parameter has the value 1, which means that each task will get its taskname from the first column of the taskfile. The %tp1 parameter specified after “3dsmax.exe” tells the cmdjob plugin to use task parameter 1 (column 1) from the tasklist as an argument to pass to 3dsmax.exe.

The tasklist text file

The Task Summary in the Queue Monitor.