ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: klind on September 08, 2020, 06:14:24 PM

Title: Writing Multiple Tags
Post by: klind on September 08, 2020, 06:14:24 PM
Given jpg files with the following example file names in <dir> - (Note that I use dot or period for <dir> after CD to the particular directory:

1968-06-05 ~xxxxxxxxxxxxxxxx ~001.jpg
2002-06-05 ~xxxxxxxxxxxxxxxx ~002.jpg

Using the following commands individually work as expected:

exiftool -'FileCreateDate<$filename 111111' -'AllDates<$filename 111111' -execute -if '$Filename lt "1972"' -FileCreateDate=19720101000000 -AllDates=19720101000000 -common_args -overwrite_original_in_place -P <dir>

exiftool -'FileModifyDate<$filename 111111' -'AllDates<$filename 111111' -execute -if '$Filename lt "1972"' -FileModifyDate=19720101000000 -AllDates=19720101000000 -common_args -overwrite_original_in_place -P <dir>

However, the multiple tag command below only changes the modify date and does not change the create date:

exiftool -'FileCreateDate<$filename 111111' -'FileModifyDate<$filename 111111' -'AllDates<$filename 111111' -execute -if '$Filename lt "1972"' -FileCreateDate=19720101000000 -FileModifyDate=19720101000000 -AllDates=19720101000000 -common_args -overwrite_original_in_place -P <dir>

This baffles me.
Title: Re: Writing Multiple Tags
Post by: StarGeek on September 08, 2020, 06:32:34 PM
The Perl library used to write the file system date is unable to write dates before a certain point.  And this point has been advancing every year.  When iit was first found, anything before 1968 would be written incorrectly.  As it stands currently, any date before 1971:01:01 00:00:00 will not be written correctly to the file system time stamps.
Title: Re: Writing Multiple Tags
Post by: StarGeek on September 08, 2020, 06:38:35 PM
Ah, just noticed that your command is single quotes.  If you're on Mac (linux as well?), my previous comment may not apply.

There is some oddity about setting the Mac FileCreateDate. Search the forums, there's a few posts from Phil about it.
Title: Re: Writing Multiple Tags
Post by: klind on September 08, 2020, 09:10:13 PM
OK... I'll go a-hunting...
Thanx!
Title: Re: Writing Multiple Tags
Post by: Phil Harvey on September 08, 2020, 09:11:09 PM
On my Mac:

> exiftool a.jpg -filecreatedate
File Creation Date/Time         : 2020:09:08 13:58:28-04:00
> exiftool a.jpg -filecreatedate=19720101000000
    1 image files updated
> exiftool a.jpg -filecreatedate
File Creation Date/Time         : 1972:01:01 00:00:00-05:00


- Phil
Title: Re: Writing Multiple Tags
Post by: klind on September 08, 2020, 10:25:43 PM
Phil... I read your response. Is it possible you misunderstand my original? I am not having any problem with FileCreateDate when used as a single tag regardless of the year being before or after 1972.

The situation occurs when run as multiple tags FileCreateDate AND FileModifyDate at the same time.

What you did on your mac works exactly the same on my mac.
Title: Re: Writing Multiple Tags
Post by: Phil Harvey on September 09, 2020, 07:42:49 AM
> exiftool a.jpg -filecreatedate=19720101000000 -filemodifydate=19720101000000
    1 image files updated
> exiftool a.jpg -filecreatedate -filemodifydate
File Creation Date/Time         : 1972:01:01 00:00:00-05:00
File Modification Date/Time     : 1972:01:01 00:00:00-05:00


This is ExifTool 12.05.  What version are you using?