How can I prevent the time to be included in the name?
{datetaken|D#yyyy-MM-dd} - *
What I want is to take the earliest date of these three
This needs a script.
function OnGetNewName(getNewNameData) {
var tmpStem = getNewNameData.newname_stem;
var tmpExt = getNewNameData.newname_ext;
var fileItem = getNewNameData.item;
var itemDateTaken = DOpus.Create.Date(fileItem.metadata.image.datetaken);
var itemCreate = DOpus.Create.Date(fileItem.create);
var itemModify = DOpus.Create.Date(fileItem.modify);
var fileDate = DOpus.Create.Date();
if (itemDateTaken > 0) fileDate = itemDateTaken;
if (itemCreate > 0 && itemCreate < fileDate) fileDate = itemCreate;
if (itemModify > 0 && itemModify < fileDate) fileDate = itemModify;
tmpStem = fileDate.Format('D#yyyy-MM-dd') + ' - ' + tmpStem;
return tmpStem + tmpExt;
}
34150.orp (1014 Bytes)