meta field "instructions" in PS & Bridge, but "Special Instructions" in EXIFTOOL

Started by flieckster, December 18, 2019, 05:40:48 PM

Previous topic - Next topic

flieckster

Hi all, so i've noticed that once in a while, i will receive PSD's from photographers who process their images from Capture One Pro. I use metadata and perl to build a google chart to tell me if the file is in different production states. my program looks at the "instructions" field, reads the data and uses that for the graph it renders.

long story short, sometimes my chart will read a file but its reporting the wrong production step. In diving in it deeper, i have seen that in Adobe Bridge, or Photoshop the psd field shows the field name as "instructions" but if you look at the data using exiftool the field is actually named "Special Instructions"

anyone else know of a fix for this?



StarGeek

What is probably happening is the file you are getting has the IPTC:SpecialInstructions field filled, but not the XMP:Instructions field.  These two filed are corresponding fields between the older IPTC IIM Legacy group and the newer XMP group, which Adobe Bridge identifies as IPTC Core.  Bridge will fill the "Instructions" field from either of these tags, depending upon which ones exist.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

flieckster

Is there some way to fix this either in the file or a best practice for looking for a single field rather then both?

StarGeek

You could copy the data from one tag to the other with something like
exiftool -wm cg "-XMP:Instructions<IPTC:SpecialInstructions" /path/to/directory

This command will copy IPTC:SpecialInstructions to XMP:Instructions if the latter doesn't exist.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

greybeard

Thanks for posting this - I had always used the "if" clause to achieve this - using "-wm cg" seems easier

StarGeek

Using something like -if "not $XMP:Instructions" might speed it up a bit.  I was just settling down to watch "The Mandalorian" and was rushing things :D

The -wm (writemode) option with cg will, in this case, "c - Create new tags" and "g - create new Groups as necessary" but not "w - Write existing tags".  It will attempt to write all files. Adding an -if option will check to see if writing the file is actually necessary.  I tend to use both in cases where I'm not sure if there is any existing metadata I don't want to overwrite.

One place you don't want to use -wm cg is when you are adding data to list type tags like Keywords because it will not update them.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

flieckster

Thanks for the workaround, but i'm not getting the result that i thought i would.

gsi-18462:~ flieckb$ exiftool -wm cg "-XMP:Instructions<IPTC:SpecialInstructions" /Users/flieckb/Desktop/MZM-UPT-S20-05001_Studio_Sleeve_2113.psd
    0 image files updated
    1 image files unchanged



it looks like its re-writing the file then nothing changes?

Phil Harvey

What is the output of this command?:

exiftool -a -G1 -Instructions -SpecialInstructions /Users/flieckb/Desktop/MZM-UPT-S20-05001_Studio_Sleeve_2113.psd

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

flieckster

[XMP-photoshop] Instructions                    : TechCloud
[XMP-photoshop] Instructions                    : EIE 12-17-19 03:48:32
[IPTC]          Special Instructions            : TechCloud


Thats not what i expected  :D

Phil Harvey

The command did nothing because XMP:Instructions already existed and you were using the -wm cg option (ie. don't edit existing tags).

I don't know why there are two different XMP:Instructions.

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

flieckster

what's the best way to write a command that udpates both 'Instructions' and 'SpeicalInstructions' with the data i need so that when i'm scanning files it will update both fields just in case?

StarGeek

The basic command would be
exiftool -Instructions="Value" -SpecialInstructions="Value" <FileOrDir>

You could also get sneaky and use a wildcard
exiftool -*Instructions="Value" <FileOrDir>
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype