Hi,
I can quickly make a python script to this task. Pyhton offers a directory walk method which selects all the files in a folder and sub folder. I have gone thru the attached images and fully understand the task. ".max" files will be replaced with the incremental selected folder name like show in the pic.
It will be a quick task with Python. Please contact me to discuss the details. I can start the work straight away.