Metadata export

Started by Nico99, July 29, 2014, 04:45:28 AM

Previous topic - Next topic

Nico99

Hi all,
I really have problems to find out a solution. Hope somebody can help me.

I need to read a huge number of images and export some of their IPTC info to a csv file. Files are located in various subfolders.
This is the command I used:
exiftool.exe -p exiftool.fmt -q -f -r Z:\ > D:\out.csv

where exiftool.fmt is:
$filename,$Description,$Format,$ColorMode,$ProfileDescription

Now the big problem is that $filename is the real file name but the IPTC tag filename , that sometimes is empty. Also I did not find a way to save the actual path of the file.
Is there any way to solve this problem ?

Thanks a lot in advance,
Nico

Nico99

Sorry, I saw I had done a mistake.

Actually the problem is that $filename is NOT the real file name but an IPTC field called filename and also that I cannot get the actual path of each file.

Thanks,
Nico

Phil Harvey

Hi Nico,

There is no IPTC tag called "FileName", so I don't know what you are talking about here.

You can use the Directory tag to give the path of the file.

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

StarGeek

Isn't IPTC:ObjectName and XMP:Title often used to hold the filename?  Maybe that's what Nico actually wants?
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Nico99

Hi both for your replies.
I actually don't  know much about IPTC but I can see that if I launch the following command, the result is the following:

c:\>exiftool -filename -q -f -S   C:\*.jpg
FileName: abc.jpg
FileName: myFile2.jpg
FileName:
FileName: test.jpg
FileName: test123.jpg

You can see that the third file hasn't any file name reported.
I can provide you that file if you need it.

Thanks,
Nico

Hayo Baan

Can you run the same commandand with the option -G0:1 added? This will tell you which group the other filename comes from.
Hayo Baan – Photography
Web: www.hayobaan.nl

Nico99

Hi HayoBaan,
All files report [File:System] except for the third one that reports [XMP:XMP-leaf].
What does it mean?
Thanks
Nico

Hayo Baan

Hi Nico,

It means that some application has created a tag in the XMP namespace XMP-leaf with the name filename. When you use $filename, apparently that is also the tag exiftool uses (instead of the one in File:System). To solve you original issue, replace $filename with $File:filename and it should work for all files, including the ones with the additional filename tag.

Cheers,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl