I did, BUT this was all based on the code I copied from your initial post...which is wrong...but it's not your fault, nor mine.....here's why!
It took a while to notice what was going on but I think we've both been kobbled.
The actual code I wrote for line 7 was:
[CODE]var sourceFile = new File(sourceFiles[i]);[/CODE]
You can see this in my first reply, but notice the difference in that line in my second.
I did wonder at the time when first reading your post why it turned italised but can you see WHERE it turns into italics?
Exactly at the point where you use 'i' as a var, enclosed in brackets.....which is the forum tags for 'italics'.
You should really use the code tags when posting code but as my second post proves even that isn't guaranteed not to fail.
Best practice is not to 'post' code at all but to 'attach' the .jsx file...although even then you'll have to zip it.
Indeed it would, and had it have been displayed properly in the first place I wouldn't have even had the need to change it.
Excellent.
Sure....don't scratch it and put plenty of cream on.
Oh right, not that sort of problem.
Not sure exactly what you mean by this, 'apply the alpha channel'...???
Wouldn't this be the same as just deleting 'Layer 1' and adding a new blank layer, and possibly renaming it?
I can take a look but it would be helpful to have some sample files to work with and a clear description on what you want to do, with reference to those files.
Knowing your OS and PS version would also help, as I can make absolutely sure the code works with that version. (Although I can only test on Windows)
Your next post has popped up while writing this so there may be some crossover.....I'll post this then read it.
Regards.
MrToM.