Hi
I would like to add a timestamp or uniqueid to a files metadata IF that tag dont already exists.
I dont want to use IPTCDigest cause the MD5 hash is changed when metadata is changed. I would like to be able to track this file even if it is changed in many ways.
Is this possible with Exiftool?
Yes.
- Phil
Great, im using the executeable exiftool.exe to extract metadata from a image to a string which i then write to an xml file.
Command -X -fast c:\myImage.jpg
Soo my question is, can i run a command to add the timestamp to metadata before extracting the data to the string. Or do i need to seperate these two processes?
Is there any example code i can check to get started?
There are lots of simple examples in the ExifTool application documentation (https://exiftool.org/exiftool_pod.html#reading_examples).
You can execute multiple commands in the same command line with -execute:
exiftool -createdate="2011:05:12 09:35:13" a.jpg -execute -X -fast a.jpg
or
exiftool -createdate="2011:05:12 09:35:13" -execute -X -fast -common_args a.jpg
- Phil
Thank you Phil, i got two commands working with your example.
Now, i would like to insert a unique ID (MD5 hash or whatever, i create this in my .net application). Then i would like to insert this ID into a suitable metadata field. The trick is, i do not want to update that field if it already has a value exists. Reason i want to do this is cause i would like to be able to track one image even if it changes in any way.
1. What is a suitable field to set a unique id that is not supposed to be updated again?
2. How do i set the command to not update if value exists?
Thanks soo far, appreciate it.
exiftool -imageuniqueid=test -imageuniqueid-= FILE
- Phil
Works like a charm, many thanks Phil.