News:

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

Main Menu

How to write to tag filemodifydate with another date but adding hours to it

Started by grumpy, August 01, 2014, 11:12:08 AM

Previous topic - Next topic

grumpy


Hi
I am trying to modify the File's Metadata "FileModifyDate" to the value of "TrackCreateDate", but I want to add 8 hours to it. I am trying to accomplish this in one single command line, so I've tried the below snippet.
But although the "FileModifyDate" sets to "TrackCreateDate", it is not adding the extra 8hours I am expecting.


Am I missing something here?



@roscoe:~ ! exiftool ~/Desktop/185.MP4 -filemodifydate -trackcreatedate
File Modification Date/Time     : 2010:04:19 05:20:59+08:00
Track Create Date               : 2006:07:01 17:20:59


@roscoe:~ ! exiftool ~/Desktop/185.MP4 '-filemodifydate<${trackcreatedate}+8:00'
    1 image files updated


@roscoe:~ ! exiftool ~/Desktop/185.MP4 -filemodifydate -trackcreatedate
File Modification Date/Time     : 2006:07:01 17:20:59+08:00
Track Create Date               : 2006:07:01 17:20:59



Thanks


Phil Harvey

First, does -api QuickTimeUTC give you what you want?

The way to add an offset is via the advanced formatting feature:

exiftool ~/Desktop/185.MP4 '-filemodifydate<${trackcreatedate;ShiftTime($_,8)}'

(the above command requires ExifTool 9.69 or later)

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

grumpy