Answered
IPTC Title
Hi guys,
I am trying to write a scipt that add Title from the document name only if the title is empty. here is what i did so far but it does not work, not sure why. sometime the title field do have a name on it and I dont want to overwrite it.
const doc = app.activeDocument;
const docName = doc.name.slice(0, -4);
if (doc.info.title == undefined) {
try {
doc.info.title = docName;
} catch (e) {}
}