ExifTool Forum

ExifTool => Developers => Topic started by: kswaha on February 24, 2021, 03:41:00 PM

Title: TIFF File Creation Date vs Modification Date ISSUE
Post by: kswaha on February 24, 2021, 03:41:00 PM
OK I am calling EXIFTool via AppleScript Shell Script from within a FileMaker Pro script.

Was having issues with THIS

set pathPOSIXFile to quoted form of POSIX path of ("PATH TO MY IMAGE FILE" as alias)
set dateTimeCreated to (do shell script "'PATH TO EXIFTOOL' -createdate " & pathPOSIXFile) as string
set dateTimeModified to (do shell script "'PATH TO EXIFTOOL' -modifydate " & pathPOSIXFile) as string

the second step was NOT getting the correct file modification datetime

SO I changed to this

set pathPOSIXFile to quoted form of POSIX path of ("PATH TO MY IMAGE FILE" as alias)
set dateTimeCreated to (do shell script "'PATH TO EXIFTOOL' -createdate " & pathPOSIXFile) as string
set dateTimeModified to (do shell script "'PATH TO EXIFTOOL' -filemodifydate " & pathPOSIXFile) as string

And NOW I get the correct file modification datetime

BUT isn't this inconsistent? Then when I tried to do this

set pathPOSIXFile to quoted form of POSIX path of ("PATH TO MY IMAGE FILE" as alias)
set dateTimeCreated to (do shell script "'PATH TO EXIFTOOL' -filecreatedate " & pathPOSIXFile) as string
set dateTimeModified to (do shell script "'PATH TO EXIFTOOL' -filemodifydate " & pathPOSIXFile) as string

It didn't work!

Most of the files are TIFF some JPEG some PSD

Please advise best syntax for retrieving both file creation and file modification datetimes?
Title: Re: TIFF File Creation Date vs Modification Date ISSUE
Post by: StarGeek on February 24, 2021, 04:13:31 PM
CreateDate and ModifyDate are the timestamps embedded in the EXIF block (and possibly elsewhere).  FileCreateDate and FileModifyDate are the file system timestamps.  They are completely different timestamps.

See EXIF tags (https://exiftool.org/TagNames/EXIF.html) and Extra Tags (https://exiftool.org/TagNames/Extra.html) for details.

As to why you can't read the file system tags in the last instance, I'm not sure.  I know you can't write to FileCreateDate on the Mac unless you have setfile available (see FileCreateDate entry on the Extra tags page), but I don't believe that should stop reading.  But then, I don't use a Mac.
Title: Re: TIFF File Creation Date vs Modification Date ISSUE
Post by: kswaha on February 24, 2021, 06:09:24 PM
OK so for accuracy I'd prefer to stay with the SYSTEM tags so how would I use the RequestAll command in my line of code so that way I could use FileCreateDate ?

'PATH TO EXIFTOOL' -filecreatedate 'PATH TO FILE'

THX!
Title: Re: TIFF File Creation Date vs Modification Date ISSUE
Post by: StarGeek on February 24, 2021, 08:18:46 PM
Just -FileCreateDate should be enough to list it.  Setting -api RequestAll=2 would be the call but it will create more tags than you would normally need.
Title: Re: TIFF File Creation Date vs Modification Date ISSUE
Post by: kswaha on February 25, 2021, 03:15:48 PM
Huh... Neither using just

-FileCreateDate

or

-api RequestAll=2 -FileCreateDate

worked :( No data returned at all

Using Mac OS Yosemite on TIFF files
Title: Re: TIFF File Creation Date vs Modification Date ISSUE
Post by: Alan Clifford on February 25, 2021, 04:49:51 PM
Does it work when run from the command line rather than in the script?
Title: Re: TIFF File Creation Date vs Modification Date ISSUE
Post by: Phil Harvey on February 25, 2021, 08:49:12 PM
What version of ExifTool are you using?:   exiftool -ver

- Phil