Use of FileModifyDate not working in my batch job

Started by smkohler, January 05, 2018, 04:27:15 PM

Previous topic - Next topic

smkohler

For a given photo in a directory (10K+ photos), I would like the file modified date, the file creation date and all of the relevant EXIF dates to be the same.  I am running exiftool as a batch job (see sample .csv attachment).  When I run the batch, all of the other parameters specified in the .csv file are updating correctly (Author, EXIF dates, copyright, etc) but the FileModifyDate and FileCreateDate fields are not updating.  I am running the the following command from the DOS prompt from within the "c:\processed" directory:  exiftool -csv="C:\processed\test.csv" "C:\processed"

For reference, all of the pictures are in my "c:\processed" directory, exiftool is in that same directory as well as the "test.csv" file.  Also, as a point of reference, my desired dates range from 1966 through 2004.  I've also included a screenshot of the modified .jpg files after the batch job to illustrate how the EXIF dates are not matching the file dates.  Any guidance on how to get this working would be appreciated! :)

smkohler

After looking through this further, I see that the "file date modified" field in windows explorer is showing up as correct for all images w/ EXIF tags >= 1980.  Having said that, the "file date created" date in windows explorer is not showing up correctly regardless of EXIF date used. So, in summary, file modified date is working for EXIF dates >= 1980 and file created dates is not working at all, regardless of which EXIF date I am using. 

It is important that I not only have the EXIF dates correct for each image, but I also have the file creation date and file modified dates be the same as my EXIF dates as I am uploading these 10k+ photos to google photos and google photos seems to only reliably use file creation and file modified dates as opposed to the EXIF dates.

StarGeek

#2
You will find that exiftool is not able to properly set file time stamps between 1900:01:01 00:00:00 and 1967:12:31 23:59:59.  This is because
QuoteExifTool uses standard Perl date/time routines to do the necessary conversions.  These routines are based on an epoch date of 1970, and the behaviour before that can be funny.
See this thread for more info.

QuoteIt is important that I not only have the EXIF dates correct for each image, but I also have the file creation date and file modified dates be the same as my EXIF dates as I am uploading these 10k+ photos to google photos and google photos seems to only reliably use file creation and file modified dates as opposed to the EXIF dates.

While Google photos can use FileModifyDate (it doesn't use FileCreateDate), that timestamp has the lowest priority on the list of the twelve tags that it will read in order to set the time on a photo.  Additionally, it might adjust that timestamp, I assume according to the local time for the server the file ends up on, so the actual time might be incorrect if you depend upon that being accurate.  My file I uploaded while retesting my data ended up with a -4 TZ from the FileModifyDate, even though my local TZ is -8.

It does take some time for Google Photos to actually read though all the data on the photos you upload, so initially it will just use the FileModifyDate but given time, it will correct itself.  I experienced this just now when I was double checking my previous research.  If you're uploading a large number of images at once, I'd give it some time to process all of them.

These are the tags that Google Photos will read to get the date for an image, in the order of priority:

       
  • EXIF:DateTimeOriginal
  • XMP:DateCreated
  • XMP:DateTimeOriginal
  • IPTC:DateCreated + IPTC:TimeCreated
  • EXIF:CreateDate
  • XMP:CreateDate
  • XMP:DateTimeDigitized
  • IPTC:DigitalCreationDate + IPTC:DigitalCreationTime
  • EXIF:ModifyDate
  • XMP:ModifyDate
  • GPS:GPSDateStamp + GPS:GPSTimeStamp (does not adjust to local time zone)
  • FileModifyDate

This list has had some changes since I initially researched it a couple years ago.  For example, IPTC:DateCreated + IPTC:TimeCreated used to be #1 priority and GPS:GPSDateStamp + GPS:GPSTimeStamp used to correctly adjust from UTC time.  But it is currently accurate.

So if you set EXIF:DateTimeOriginal (which you do when you set AllDates), you should see Google Photos properly sort given time.
"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

smkohler

Thanks so much for your detailed response!  It was hugely helpful.  I really appreciate it! - Sean