Question
Add metadata after moving file
I don't know of this is possible, I need to rename a lot of images and then add metadata to them.
short code
LrFileUtils.copy(SourceFile, TargetFile)
--------- Add to catalog --------
local result = catalog:withWriteAccessDo("Reimport photos", function(context)
RenamedFile = catalog:addPhoto(TargetFile)
end)
for _, newphoto in ipairs(RenamedFile) do
catalog:withPrivateWriteAccessDo(function(context)
newphoto:setPropertyForPlugin( _PLUGIN, 'xxx', yyy)
end)
endThere is no metadata added to the new image.
