Fixing photoshop:datecreated tag in xmp sidecar file

Started by filmgeezer, December 09, 2017, 02:32:28 PM

Previous topic - Next topic

filmgeezer

I've use some exiftool shortcuts to batch fix (mostly dates) on images in my collection. Over the years, varying (lousy) image programs have sometimes put strange dates in strange places, and I have been able to normalize these *mostly* based on the original exif dates.

I'm having trouble getting the photoshop:datecreated tag to update for some image XMP sidecar. My command syntax seems to work fine on the jpegs, but not on the xmp sidecars. (I want them all to be the same if possible because I sometimes end up copying values from XMP sidecars back into jpegs...)

My shortcut for windows is:


"C:\Program Files (x86)\Exiftool\exiftool.exe" -Iptc:DateCreated<exif:createdate -execute -photoshop:datecreated<exif:createdate -r -k  -progress


I'll get a files updated message just fine on jpegs, but if I run it on XMP sidecars, I'll get the no writeable tags error. However, if I open these sidecars, I can see they've got the following:

photoshop:DateCreated="2007-07-04"

I'm sure I'm missing something pretty simple, but I haven't been able to search up what it is.


Phil Harvey

There is no Photoshop:DateCreated tag.  Perhaps you meant XMP:DateCreated, or XMP-photoshop:DateCreated.

- 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 ($).

filmgeezer

The latter is what I mean.

If I change my shortcut target to:


"C:\Program Files (x86)\Exiftool\exiftool.exe" -Iptc:DateCreated<exif:createdate -execute -XMP-photoshop:datecreated<exif:createdate -r -k  -progress


I get the same issue. The jpeg file shows as updated just fine. The xmp file says no writeable tags.

When I simplify to just


"C:\Program Files (x86)\Exiftool\exiftool.exe" -XMP-photoshop:datecreated<exif:createdate -r -k  -progress


I get the same behavior.

When I check the file metadata, I can see that the jpeg did update the XMP-photoshop tag. The XMP file still shows the tag, the prior, incorrect one.

for example

From the jpeg tags output to a text file and grouped:

---- XMP-photoshop ----
Caption Writer                  : bg
City                            : Florence
Country                         : Italy
Credit                          : bg
Date Created                    : 2007:07:02 15:35:52

from the xmp file:

---- XMP-photoshop ----
City                            : Florence
Country                         : Italy
Credit                          : bg
Caption Writer                  : bg
Date Created                    : 2009:06:13
Legacy IPTC Digest              : F609A5AAB5659594388188C69833A272

Phil Harvey

There must be something else happening here.  Try from the command line to see what messages you get.  Also try adding -v2 to see more verbose messages.

- 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 ($).

filmgeezer

I did some more testing to try to figure out what's happening. (Of course, the easiest solution would be to delete all the XMP sidecars and let lightroom recreate from the jpgs and raw files, but I might lose some metadata this way that hasn't been written into the jpegs by lightroom, and I really wanted to figure this out.)

After a bunch of wondering and test runs on a single set of files for a single image, I finally figured out (duh) that there's no exif:createdate in the XMP file! There's an xmp:createdate, and that works just fine with the command line.

Rewriting the shortcut like this, using just createdate, works for all 3 file types, though for the image files that createdate is exif:createdate, and for the xmp, it's xmp:createdate

"C:\Program Files (x86)\Exiftool\exiftool.exe" -Iptc:DateCreated<createdate -execute -XMP-photoshop:datecreated<createdate -r -k -progress