GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Metadata copy from one field to another

I need to select a folder or group of files and, for each file, copy the contents of one metadata field to another.

Specifically, for each of a group of image files, I want to copy each (different) Author name into the Description field (my photo club uses a web gallery that displays the Description, not the Author).

Should I expect to need to write a Script to do this, or might there be a way of issuing a command ?

You would probably need some script code for this, but we can help if needed.

Could you zip a couple of example input files, and also versions of them set how you want them to end up, so we can ensure the script does the right thing with your inputs?

Dunno about the OP specific needs but...

That would be extremely valuable if one is editing metadata a lot within Opus. I very often use something like this with jRiver's own library (tagging) tools...

image

I attach a zip file with before and after examples. Each initial file has a different author in the metadata field known as Authors to Opus and Windows (or Creator to Lightroom, or Author in Photoshop). I would like a way to copy the author in each file to a second metadata field in each file. This field is known as Description to Opus/Windows/PS or Caption in LR.

So the first file ends up with "Joe Bloggs" in the author and description fields, the second one has "Jane Bloggs" and so on.

[As an aside, I notice that the field known as "Subject" in Opus and Windows is not accessed by the Adobe products and if a file with an entry in that field is imported to Lightroom and re-exported, that field entry is stripped.]

I am very grateful for any help received, but am happy to go and learn a bit of scripting as long as you are sure that is the way to go.
for Opus.zip (968.2 KB)

Had similar issues with lightroom and other photo editing/viewing software. How each program/OS chooses to manage metadata esp with images is very different and there's no single standard.

Opus doesn't show all data fields though... Exif metadata for the yellow flower has the 'artist' field as Joe Bloggs which is equivalent to the IPTC 'creator'. 'Author' here seems to be windows file metadata. And jRiver does not even show/allow the use for that particular data field with images. Same with Description 'title' and 'subject' don't appear as well... only in Windows, and Dopus.

Apologies for the long delay.

This script-button will copy an image's Author to its Description field:

Script code for reference:

function OnClick(clickData)
{
	var cmd = clickData.func.command;
	cmd.ClearFiles();

	for (var eSel = new Enumerator(clickData.func.sourcetab.selected_files); !eSel.atEnd(); eSel.moveNext())
	{
		var item = eSel.item();

		if (item.metadata.image != null)
		{
			var author = item.metadata.image.mp3artist;
			if (author != null && typeof author == "string" && author.length > 0)
			{
				var cmdLine = 'SetAttr FILE="' + item.RealPath + '" META "imagedesc:' + author + '"';
				cmd.RunCommand(cmdLine);
			}
		}
	}
}

This works on the three test images, but I recommend making backups of files before using the button on them, just in case. Always best to have the untouched originals to go back to, in case the metadata gets messed up by different programs editing the same file with different conventions or metadata types.

1 Like

SCNR

exiftool.exe "-Description<Creator" {allfilepath}

Thanks a lot for your time, Leo. I'll give it a shot.