Hello
Is there a way to know quickly if a file has EXIF, IPTC, XMP ?
I would like to know if these metadata are in the file, without really reading them.
jean
Hi Jean,
You can do quick and dirty tests by using grep to search for patterns in files to determine if a file may contain these types of metadata. But to tell for sure you really need to parse the file structure properly.
In both cases, of course, you are actually reading the file. To do so without reading it would require a good fortune teller.
- Phil
Hi Phil
Thank you, i will try using the program kept in memory, it should be fast
Just guessing here, but the words "without reading" might mean "without seeing" the meta data. So something like
exiftool -G dsc_5486.jpg | grep -i xmp > /dev/null; echo $?
would give a 1 or a 0 result.
Alan
Quote from: Alan Clifford on December 07, 2011, 06:55:19 PM
Just guessing here, but the words "without reading" might mean "without seeing" the meta data. So something like
exiftool -G dsc_5486.jpg | grep -i xmp > /dev/null; echo $?
would give a 1 or a 0 result.
Here is a way to do this a bit more easily:
exiftool -p '$xmp:all' image.jpgThis command returns 1 if XMP exists, or 0 if it doesn't. (Note: Use double quotes instead of single quotes if you are in Windows)
- Phil