Recursive not inclduing files in root directory?
Hi,
I have lifted this portion of script from the maxscript reference to loop through all .max files in a root folder and all child folders. The script processes .max files in child folders but not .max files in the root folder... could someone help me figure it out please?
--fn getFilesRecursive root pattern = ( dir_array = GetDirectories (root+"/*") for d in dir_array do join dir_array (GetDirectories (d+"/*")) my_files = #() for f in dir_array do join my_files (getFiles (f + pattern)) my_files ) location = getSavePath caption:"Files to process..." --get all .max files from the specified folder --and all its subfolders: getFilesRecursive location "*.max" -- change the folder here <code>
Comments
.
Try this:
Tools and Scripts for Autodesk 3dsMax