While sorting my pictures I realised that many pictures have different CreateDate and DateTimeOriginal:
[File:System] FileModifyDate : 2014:05:04 20:04:34+01:00
[File:System] FileAccessDate : 2021:12:14 08:07:32+00:00
[File:System] FileInodeChangeDate : 2021:12:14 08:07:32+00:00
[EXIF:ExifIFD] DateTimeOriginal : 2014:05:04 20:04:34
[EXIF:ExifIFD] CreateDate : 2002:12:08 12:00:00
I am not sure why is that (can anyone hint me why those tags exists - their meaning seems the same ?) but I would like to adjust the CreateDate to be the same as DateTimeOriginal.
How do I do that with exiftool ?
Quote from: lumiere on December 18, 2021, 03:34:25 PM
(can anyone hint me why those tags exists - their meaning seems the same ?)
Answered in your other thread
Quotebut I would like to adjust the CreateDate to be the same as DateTimeOriginal.
How do I do that with exiftool ?
See this example (https://exiftool.org/exiftool_pod.html#exiftool--FileModifyDateDateTimeOriginal-dir) from the Copying Examples in the docs. You would change
FileModifyDate into
CreateDate.
This command creates backup files. Add
-Overwrite_Original (https://exiftool.org/exiftool_pod.html#overwrite_original) to suppress the creation of backup files. Add
-r (https://exiftool.org/exiftool_pod.html#r-.--recurse) to recurse into subdirectories.
Thanks @StarGeek again.
Can I combine FileModifyDate and CreateDate in one go, i.e.:
'-CreateDate<FileModifyDate<DateTimeOriginal'
or do I need to run exiftool twice with different parameters ?
You can't combine them in a single option, but you can set multiple tags at the same time
'-CreateDate<DateTimeOriginal' '-FileModifyDate<DateTimeOriginal'
I really appreciate your help StarGeek - thanks a lot !
One last question - I am sorting both family pictures and videos and would like to keep them side by side in the same folder in they are taken/recorded in the same day.
The videos don't have DateTimeOriginal - can I use fallback this way:
exiftool -api QuickTimeUTC '-CreateDate<DateTimeOriginal' '-FileModifyDate<DateTimeOriginal' '-filename<CreateDate' '-filename<DateTimeOriginal' -d pictures/%Y/%m/%d/%Y-%m-%d_%H:%M:%S%%+c.%%e -r ../source_folder/
The intention is:
- if this is a picture - use DateTimeOriginal as the source of truth, modify CreateDate to be the same and name the file as the pattern; if there is no DateTimeOriginal - use CreateDate as the source of truth
- if this is a video - use CreateDate to sort it (and use the same file pattern as above)
Looks about right and you have the -api QuickTimeUTC option (https://exiftool.org/ExifTool.html#QuickTimeUTC) in there so it will correctly write the timestamps for videos. The -api call will have no effect on images.