How to adjust CreateDate to DateTimeOriginal ?

Started by lumiere, December 18, 2021, 03:34:25 PM

Previous topic - Next topic

lumiere

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 ?

StarGeek

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 from the Copying Examples in the docs.  You would change FileModifyDate into CreateDate.

This command creates backup files.  Add -Overwrite_Original to suppress the creation of backup files.  Add -r to recurse into subdirectories.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

lumiere

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 ?

StarGeek

You can't combine them in a single option, but you can set multiple tags at the same time
'-CreateDate<DateTimeOriginal' '-FileModifyDate<DateTimeOriginal'
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

lumiere

I really appreciate your help StarGeek - thanks a lot !

lumiere

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)

StarGeek

Looks about right and you have the -api QuickTimeUTC option in there so it will correctly write the timestamps for videos.  The -api call will have no effect on images.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype