Run a script in multiple files."batch script"

I am looking for an action that runs another script in the files within a folder. (.max) I select the folder, and script run on all the files then save. (Ex: Zero-Center Pivot Switcher). It is too complex?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fajar's picture

little idea :maxF= getFiles

little idea :

maxF= getFiles @"D:\MAX\Archmodel\Vol.01\Arch Model Vol.07 Electronics\*.max" -- you can change this folder, just leave *.max as it be, because you want to open max file correct ?
 
mapped fn scriptToRun obj = ---script that you want to run [this is do centering the object geomtry pivot in the center]
(
	centerPivot obj
)
 
-- and last do looping open maxfile and do something with our script, then save the max file 
for i in maxF do loadMaxFile i useFileUnits:true quiet:true ; scriptToRun geometry ;saveMaxFile i quiet:true  

not checking it yet...on my phone right now.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.