set date based on best available information

Started by agrefrath, December 30, 2018, 10:22:42 AM

Previous topic - Next topic

agrefrath

I want to set replace an empty value for the EXIF creation-Date by the file creation date and I am not successful to find out how.

exiftool "-datetimeoriginal<filemodifydate" *   

obviously does the job for ALL files; but how can I modify the command to only change the date for the pictures, which have NO EXIF information on the date?

Many thanks for your support!!!

StarGeek

Try the -wm (writemode) option, specifically, -wm cg.  That will "Create new tags" but not "Write existing tags".
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

agrefrath

wow! many thank. Clear and crisp answer, which solves the topic. I really do appreciate your help.

exiftool -r -wm cg "-datetimeoriginal<filemodifydate" *

solves my issue (check every file of the whole underlying structure and set the EXIF Date to the Filesystems Datestamp, if (and only if) the EXIF Date is empty.) That seems to me the best educated guess on the particular photo's date.