ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Nico99 on July 29, 2014, 04:45:28 AM

Title: Metadata export
Post by: Nico99 on July 29, 2014, 04:45:28 AM
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
Title: Re: Metadata export
Post by: Nico99 on July 29, 2014, 06:22:39 AM
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
Title: Re: Metadata export
Post by: Phil Harvey on July 29, 2014, 07:55:13 AM
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
Title: Re: Metadata export
Post by: StarGeek on July 29, 2014, 11:53:44 PM
Isn't IPTC:ObjectName and XMP:Title often used to hold the filename?  Maybe that's what Nico actually wants?
Title: Re: Metadata export
Post by: Nico99 on August 01, 2014, 02:16:24 PM
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
Title: Re: Metadata export
Post by: Hayo Baan on August 01, 2014, 06:11:06 PM
Can you run the same commandand with the option -G0:1 added? This will tell you which group the other filename comes from.
Title: Re: Metadata export
Post by: Nico99 on August 02, 2014, 04:10:16 AM
Hi HayoBaan,
All files report [File:System] except for the third one that reports [XMP:XMP-leaf].
What does it mean?
Thanks
Nico
Title: Re: Metadata export
Post by: Hayo Baan on August 02, 2014, 11:43:49 AM
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