How could I replace a open document name with a new name?
I have a script that creates the new name but I can't figure out how to send the new name back to photoshop replacing the open document name.
Here is the current script:
*********************
layerN = activeDocument.activeLayer.name
var doc = app.activeDocument
var fname = doc.name.split(".")
var fname = fname[0]
var newDoc = doc.duplicate(fname+layerN,true)
//var newDoc = (fname+layerN,true)
app.activeDocument.name = newDoc
newDoc.flatten();
***************************
Right now this one makes a duplicate of the original document with the document name like I want, but I would rather just rename the original document instead of making a duplicate.
Any help is appreciated.