News:

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

Main Menu

'De-stripping' Dates in files based on ContentCreateDate or FileModifyDate

Started by clem, October 11, 2018, 06:32:21 PM

Previous topic - Next topic

clem

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


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.


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?


exiftool '-<TrackCreateDate<TrackModifyDate<CreateDate<ModifyDate<MediaModifyDate<MediaCreateDate<ContentCreateDate'


definitely doesn't work.    ;)  8)

thank you for additional tips :-)

StarGeek

Quote from: clem on October 11, 2018, 06:32:21 PM
I'd like to copy all the ContentCreateDate data to the blank fields.


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.

Quotehow 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
* 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).

clem

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!



Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).