Writing Multiple Tags

Started by klind, September 08, 2020, 06:14:24 PM

Previous topic - Next topic

klind

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.
Ken Lind

StarGeek

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.
"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

StarGeek

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.
"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

klind

OK... I'll go a-hunting...
Thanx!
Ken Lind

Phil Harvey

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

klind

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.
Ken Lind

Phil Harvey

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