News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Modify only dates stored in an invalid format

Started by snizbatch, May 25, 2014, 05:02:04 PM

Previous topic - Next topic

snizbatch

I recently tried importing photos into Adobe Elements Organizer and it failed every time at certain JPGs.  Well, it turns out that the dates stored in the EXIF data for some of my files is causing this.  When opened in ExifDataViewer app, I see
"Date/time original:         12/30/1899 12:00:00 AM" 
"Date/time digitised:     12/30/1899 12:00:00 AM"
in exiftool I see
"Modify Date        :   2"
"Create Date       :   2"

I have 32,000 photos and need to identify the ones with this corrupt date value and rewrite them, so I tried:

exiftool "-*Date<FileModifyDate" -if "$*Date le '1920:01:01'" .

but I get "6 files failed condition"  "0 image files read"

Is there a valid solution to my problem?


Phil Harvey

I think this command may do something like what you want:

exiftool "-exif:alldates<filemodifydate" -if "length $modifydate < 10" .

This will replace all of the EXIF date/time tags based on the length of ModifyDate.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).