ExifTool Forum

ExifTool => Newbies => Topic started by: wout on April 13, 2018, 12:47:52 AM

Title: Simple code no longer works
Post by: wout on April 13, 2018, 12:47:52 AM
Hello,

I used the code exiftool '-Title>Description' FILE to add a description based on the title field, and it worked on all my files last week. I'm copying IPTC data on JPEG files.

But now all descriptions have disappeared on the files and the code nog longer works - no description is added. So strange :-\

What could I be doing wrong? Maybe due to an OSX system update?

Thanks

Wout
Title: Re: Simple code no longer works
Post by: Phil Harvey on April 13, 2018, 12:47:18 PM
Hi Wout,

What does this command give?:

exiftool -title FILE

If there is no title, then your copy command will do nothing.

- Phil
Title: Re: Simple code no longer works
Post by: wout on April 13, 2018, 08:58:50 PM
Hey Phil,

It returns the title

Title                           : Golfer holding golf ball with glove

So very strange it does not copy :-\

When I make the command it gives me     1 image files updated

So it did something. And it worked before so that's the weirest part.
Title: Re: Simple code no longer works
Post by: Alan Clifford on April 14, 2018, 07:05:46 AM
Quote from: wout on April 13, 2018, 12:47:52 AM
Hello,

I used the code exiftool '-Title>Description' FILE to add a description based on the title field, and it worked on all my files last week. I'm copying IPTC data on JPEG files.

Wout

That command worked for me using a jpg from a Fuji X-S1 camera on Macos High Sierra.  However, in my photo, both Title and Description are XMP rather than IPTC.

Could you post before and after versions of your photo.


Title: Re: Simple code no longer works
Post by: Phil Harvey on April 14, 2018, 07:11:11 AM
I think I need more details now.  Does ExifTool say the file is updated?  Can you read back the Description with ExifTool?  What exactly do you mean by "no longer works"?

- Phil
Title: Re: Simple code no longer works
Post by: wout on April 14, 2018, 10:43:32 PM
Hey Phil,

Thanks for the insights!

I ran exiftool -description FILE and they are all there... so exiftool did it's job.

But... OSX finder does not show the description in the finder. And it DID two weeks ago.

I found an article saying this:

QuoteWhile the Finder information window will show you these details, this may only be a subset of the metadata that a file contains. To see these details in-depth, you will need to use the Terminal's "mdls" command, which will list all the metadata tags and values bound to a specific file.
Source: https://www.macissues.com/2014/05/12/how-to-look-up-file-metadata-in-os-x/ (https://www.macissues.com/2014/05/12/how-to-look-up-file-metadata-in-os-x/)

I can live with that (although it's stupid) - the most confusing part is where the finder showed me the description before, and now it does not anymore.

So I will just need to use exiftool now to check it the description was copied instead of reading it directly in the finder.

Also, the mdls FILE command in the terminal, gives me a lot of extra info, but the description is NOT there, while it is there when I ask it in exiftool.

I'm disappointed in apple here - but I can trust exiftool to check the description - very happy about that!
Title: Re: Simple code no longer works
Post by: Phil Harvey on April 15, 2018, 07:23:48 AM
I thought that may be the problem.

BTW, ExifTool will return the results of mdls with this command:

exiftool "-mditem*" FILE

There are a few different ways to get ExifTool to show the mdls tags, and this is one of them.  See the MacOS tags documentation (https://exiftool.org/TagNames/MacOS.html) for details.

- Phil
Title: Re: Simple code no longer works
Post by: Alan Clifford on April 15, 2018, 07:25:33 AM
Try this

exiftool '-Title>mwg:Description' x-s1_3579_2.jpg

I think with your original command line, you were creating xmp:description and Spotlight was not creating "MDItemDescription" from that.

I now see the description in finder which will be mditemdescription in exiftool;

cellini:temp alan$ exiftool -a -G -s  -iptc:objectname -xmp:title -xmp:description -mditemtitle -mditemdescription x-s1_3579_2.jpg

[IPTC]          ObjectName                      : Danger Point Lighthouse
[XMP]           Title                           : Danger Point Lighthouse
[XMP]           Description                     : Danger Point Lighthouse
[File]          MDItemTitle                     : Danger Point Lighthouse
[File]          MDItemDescription               : Danger Point Lighthouse


Title: Re: Simple code no longer works
Post by: Alan Clifford on April 15, 2018, 07:34:31 AM
Spotlight must be creating its description from one of these: 

cellini:temp alan$ exiftool -G -exif:imagedescription -iptc:caption-abstract x-s1_3579_2.jpg
[EXIF]          Image Description               : Danger Point Lighthouse
[IPTC]          Caption-Abstract                : Danger Point Lighthouse


Title: Re: Simple code no longer works
Post by: wout on April 16, 2018, 12:00:50 PM
Alan,

Thanks so much for reading up!

exiftool '-Title>mwg:Description' is the solution indeed! Now the finder shows the data again.

Problem solved - thanks both :D