I think your code is almost perfect,
I got a problem tho,
in the code above you have defined that you create batch1,
this will not work because each time I pick new INDD files, the script creates batch1 again and again,
it would be better if instead of "batch1"
the script would look one level up for the folder name example "batch3" then takes that name and create the folder.
Could you master form the code that way?
Thank you in advance sir Chinna!