You just got an answer that there isn't any way in Acrobat JS to get a list
of files in a folder, so what's the point of this question?
The only way you can collect file names is by using an Action and saving
the paths of the files processed into a global array, which you can later
on use in other scripts.
Can you point me towards some documentation on this?
On what, exactly? The method I described? There's no documentation on it. It's a combination of scripting techniques that developers use. I have created various scripts that use this system.