Author Topic: 'De-stripping' Dates in files based on ContentCreateDate or FileModifyDate  (Read 389 times)

clem

  • Jr. Member
  • **
  • Posts: 15
Thanks again for your help!

One additional thing I'm trying to do is to de-munge all the mp4/mov files that I've received through exif-stripping/hostile apps such as WhatsApp. So far a workable kludgy workaround to get files into at least the same 'month' or week is to base it on FileModifyDate or ContentCreate Date. Unfortunately digital asset managing apps such as Lightroom don't think to peek into the exif data and look at FileModifyDate/Content Create date. So

Code: [Select]
FileModifyDate                  : 2012:12:05 11:15:17-08:00
FileAccessDate                  : 2018:10:11 15:25:30-07:00
FileInodeChangeDate             : 2018:05:31 23:39:39-07:00
CreateDate                      : 0000:00:00 00:00:00
ModifyDate                      : 0000:00:00 00:00:00
TrackCreateDate                 : 0000:00:00 00:00:00
TrackModifyDate                 : 0000:00:00 00:00:00
MediaCreateDate                 : 0000:00:00 00:00:00
MediaModifyDate                 : 0000:00:00 00:00:00
ContentCreateDate               : 2012:12:05 11:15:17-08:00

I'd like to copy all the ContentCreateDate data to the blank fields.

Code: [Select]
exiftool '-MediaCreateDate<FileModifyDate'

works fine for a single field… how do I stack them all up and fix a directory of similarly mangled files without iterating through each field set for a directory?

Code: [Select]
exiftool '-<TrackCreateDate<TrackModifyDate<CreateDate<ModifyDate<MediaModifyDate<MediaCreateDate<ContentCreateDate'


definitely doesn't work.    ;)  8)

thank you for additional tips :-)
« Last Edit: October 11, 2018, 07:21:19 PM by clem »

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2516
I'd like to copy all the ContentCreateDate data to the blank fields.

Code: [Select]
exiftool '-MediaCreateDate<FileModifyDate'

I'm a little confused here.  Do you want to copy ContentCreateDate or do you want to copy FileModifyDate?  You say one then use the other as an example.

Quote
how do I stack them all up and fix a directory of similarly mangled files without iterating through each field set for a directory?

You have to list each copy individually.  So if you want to copy ContentCreateDate to TrackCreateDate, TrackModifyDate, CreateDate, ModifyDate, MediaModifyDate, and MediaCreateDate, then you have to do each item.
exiftool "-TrackCreateDate<ContentCreateDate" "-TrackModifyDate<ContentCreateDate" "-CreateDate<ContentCreateDate" "-ModifyDate<ContentCreateDate" "-MediaModifyDate<ContentCreateDate" "-MediaCreateDate<ContentCreateDate" FileOrDir
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

clem

  • Jr. Member
  • **
  • Posts: 15
My mistake.  I wasn't clear.

In this case, FileModifyDate = ContentCreateDate re: data content. Sometimes I only have valid FileModifyDate data, sometimes I have only valid ContentCreateDate data.


Nonetheless your solution worked. Thank you muchly!


« Last Edit: October 12, 2018, 01:28:59 AM by clem »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
So maybe try this:

exiftool "-TrackCreateDate<FileModifyDate" "-TrackModifyDate<FileModifyDate" "-CreateDate<FileModifyDate" "-ModifyDate<FileModifyDate" "-MediaModifyDate<FileModifyDate" "-MediaCreateDate<FileModifyDate" "-TrackCreateDate<ContentCreateDate" "-TrackModifyDate<ContentCreateDate" "-CreateDate<ContentCreateDate" "-ModifyDate<ContentCreateDate" "-MediaModifyDate<ContentCreateDate" "-MediaCreateDate<ContentCreateDate" FileOrDir

- 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 ($).