Copy link to clipboard
Copied
Hi,
is it possible to change the name of an opened but not saved document?
If I open a photo from ACR as an object, PS will append "as object" to the document name.
I'd like to delete that part of the document name, BEFORE it will be saved.
Or is there another way to do that?
app.activeDocument.name is read only...
Thanks!
Try this:
-X
var original = app.activeDocument;
var newDoc = original.duplicate(original.name.replace(' as object', ''));
original.close(SaveOptions.DONOTSAVECHANGES);
Copy link to clipboard
Copied
Try this:
-X
var original = app.activeDocument;
var newDoc = original.duplicate(original.name.replace(' as object', ''));
original.close(SaveOptions.DONOTSAVECHANGES);
Copy link to clipboard
Copied
@ xbytor2:
Works perfect, thanks!!
Copy link to clipboard
Copied
If all you want to do is edit the name of the saved file then you could just do a saveAs and edit the name.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now