If you have used the Adobe Photoshop script called "Load Files into Stack...", you likely have noticed it pollutes the layer names with the file extension of the files it pulls in. If you then run Altia PhotoProto or some other script that uses a layer name to create a file name, it adds an extra file extention, creating for example, .png.png vs just .png in the outputted file name. It is a simple 1-line change to the Adobe "CreateImageStack.jsx" script (attached) to fix this issue.
The fix was simply adding the .replace to line 411:
app.activeDocument.activeLayer.name = this.fName.replace(".png","");
You can apply this fix yourself, or copy the attached file to:
C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\Presets\Scripts\Stack Scripts Only\CreateImageStack.jsx
File:
https://altia.zendesk.com/attachments/token/d6GNBe1DV67ywfiVpcnr3WEWe/?name=CreateImageStack.jsx
Additionally, there are some other scripts both from Adobe and end users that are helpful for renaming layers. Find some of them below:
http://blog.kam88.com/en/group-layer-renaming-script.html
http://www.ps-bridge-scripts.talktalk.net/ (Layer Name Editor).
This script has even more options:
https://creative.adobe.com/addons/products/1702#.VN3V7vmG9G0