Author Topic: Modify only dates stored in an invalid format  (Read 1237 times)


  • Newbie
  • *
  • Posts: 1
Modify only dates stored in an invalid format
« on: May 25, 2014, 05:02:04 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Modify only dates stored in an invalid format
« Reply #1 on: May 26, 2014, 07:21:34 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).