Copy link to clipboard
Can I please get help with creating a script that will give a prompt to rename an open file in Photoshop without saving or duplicating?
I have the below script which works great when duplicating, but I'm not sure how to create a new one with the above requirements.
// Dupe Original File with -Suffix.jsx
var origDoc = app.activeDocument
var baseName = origDoc.name.replace(/\.[^\.]+$/, '');
var sep = String ("-");
var suffix = prompt("Enter Suffix:", "Suffix");
var dupeName = baseName + sep + suffix;
// Optional Step: remove the // comment characters to enable
origDoc.close(SaveOptions.DONOTSAVECHANGES); // (SaveOptions.SAVECHANGES)
I don't understand your requirement. How are we supposed to change the file's name if we don't save or duplicate it? Can you explain what you intend to do if you had to do it manually without a script?