Are you after automating this? If so, it may be hard.
I would suggest that you run the action [I assume there is just one] on the folder of files first – you could use a droplet.
I can’t see how to automate the pulling together of all the files into layers in a single doc. Is it too big a job to do by hand. I’ve done this for 100-200 files before – takes a while. You’d have to rename each layer as you go along.
From your post, I assume that you want to take a folder that has, maybe 20 images (for giggles and grins) in it, and layer them one by one into a single new file. Further, you want each new layer to be automatically named for the source file from which it came.
Your new file would be, for example, BigOne.PSD. In that file you have:
Layer-1= Mary.psd
Layer-2= Wedding.psd
Layer-3= Airplane.psd
Et cetera.
There are a couple of significant challenges that prevent error trapping, but of all the challenges, the filename issue is the biggest.
There is, at present, no way that I know of to incorporate filename information in an action, unless you use the scripting plug-in. Personally, I don’t know anything about the scripting plug-in, but your question (basically, retrieving filename information to use with an image) has been asked before and there’s no way I’ve seen to accomplish this.
Peace,
Tony