ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: dzeek on April 18, 2020, 02:15:04 PM

Title: Write a different value of the same tag in multiple files with one command
Post by: dzeek on April 18, 2020, 02:15:04 PM
I have extracted a series of frames from a video file into a series of JPG files using FFMPEG. I need to calculate and write the value of the EXIF tags "DateTimeOriginal" and "CreateDate" for each file. Is is it possible to do this with one exiftool command? For example, something like:

exiftool -DateTimeOriginal=@list -CreateDate=@list *.jpg

where list is a file that contains the list of values to be written for each file. In other words, the first value in the list would be written to the tags in the first file, the second value in the list to the tags in the second file, etc.

This is going to be done for multiple videos on a repeated basis so I would like to find an automated way. I know I could use a command for each file but that would be much slower.
Title: Re: Write a different value of the same tag in multiple files with one command
Post by: StarGeek on April 18, 2020, 02:30:53 PM
I would suggest converting your list to a CSV file and using the -csv option (https://exiftool.org/exiftool_pod.html#csv-CSVFILE).  See also FAQ #26 (https://exiftool.org/faq.html#Q26).
Title: Re: Write a different value of the same tag in multiple files with one command
Post by: dzeek on April 18, 2020, 04:17:54 PM
Perfect! Thank you.