NEED to write XMP to original without duplicate.

Started by jhaneyzz, September 11, 2013, 04:13:28 PM

Previous topic - Next topic

jhaneyzz

I understand the reservations stated in your documentation relative to writing metadata directly to a file.

However.

I have thousands of assets on a file system managed by a DAM - Adobe CQ5.

I also have many thousands of metadata values that I need to apply to these assets so that CQ can import this essential data.

My intention is to write the metadata to xmp fields in these (mostly PDF and Jpeg) assets.

Problem: When ExifTool takes the original and renames it, you don't fool CQ! It knows that you renamed it and dutifully keeps tracking that asset. The "New" document which has the metadata written to it is just that, a NEW document. Now I have two, but any user-entered metadata within CQ and not embedded in the XMP remains associated with the renamed file.

This just won't do.

Is there any way to bypass the duplication step and let me bear the responsibility if anything goes wrong. I have adequate backup systems in place to recover from any potential disasters.

I need an answer quick.

jhaneyzz

Alternatively, how about this.

instead of preserving the original, you could make a duplicate of the file, named (backup) or something, and then write the data to the REAL original file.

This would meet my requirements and I could preserve/dispose of the pre-processed duplicates as I choose.


Phil Harvey

Quote from: jhaneyzz on September 11, 2013, 04:13:28 PM
Is there any way to bypass the duplication step and let me bear the responsibility if anything goes wrong.

Yes.  Add the -overwrite_original option to your command.  If this still doesn't work with CQ, then -overwrite_original_in_place will (but it is slower, so don't do this unless necessary).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jhaneyzz

Phil,

As always, you are awesome.

But is this documented? And if so, where????

I couldn't find it even after you posted the syntax here.

Is there some documentation that I don't know about?

Phil Harvey

If you run exiftool with no arguments, you will see the documentation that explains all of these options.  It is also available in html format on the ExifTool web site here or as a PDF document here (all linked from the ExifTool home page).

You aren't the only one who can't seem to find this documentation, but I don't known how I can make it more obvious.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jhaneyzz

As a follow up to anyone who looks at this thread later.

-overwrite_original_in_place is the one and only option that worked.

With any other option, certain DAM systems running on top of the data folder you are working in, keep track of the documents using the file storage system's unique ID, not by the file name. Editing the metadata of a copy of the original and then deleting the original and giving the edited copy the original file's name hopelessly confuses the DAM, resulting in broken links and orphaned files.

-overwrite_original Overwrite original by renaming tmp file {This option does not work}
-overwrite_original_in_place Overwrite original by copying tmp file {This option DOES work}

Sample usage:
(xxx represents your custom xmp field name.)

using exiftool -overwrite_original_in_place -xxx='Test pdf Update'  "/Volumes/server1/main/dam/damcontent/textdocs/xmpTestFile_original_in_place.pdf"