I want to update all time metadata with file modify time, but don't know how to write the file modify time into the command line.
exiftool -time:all="FileModifyDate" -wm w -P file
The above command line doesn't work.
Here is my file informaiton. I want to change every time label to FileModifyDate, in this file it is '2018:02:08 21:04:08+08:00'.
exiftool -time:all -g1 -a -s IMG_1531.mp4
---- System ----
FileModifyDate : 2018:02:08 21:04:08+08:00
FileAccessDate : 2018:10:09 11:29:28+08:00
FileCreateDate : 2018:10:09 10:20:10+08:00
---- QuickTime ----
CreateDate : 2018:10:09 11:27:55
ModifyDate : 2018:10:09 11:27:55
---- Track1 ----
TrackCreateDate : 2018:10:09 11:27:55
TrackModifyDate : 2018:10:09 11:27:55
MediaCreateDate : 2018:10:09 11:27:55
MediaModifyDate : 2018:10:09 11:27:55
---- Track2 ----
TrackCreateDate : 2018:10:09 11:27:55
TrackModifyDate : 2018:10:09 11:27:55
MediaCreateDate : 2018:10:09 11:27:55
MediaModifyDate : 2018:10:09 11:27:55
Use
exiftool "-time:all<$FileModifyDate" -wm w -P file
(replace double quotes with single quotes on a Mac/Linux)
Thanks, it works. But the metadata times are all in UTC time zone as follow. Is it possible to add time zone info to metadata time?
======== IMG_1531.mp4
---- System ----
FileModifyDate : 2018:02:08 21:04:08+08:00
FileAccessDate : 2018:10:09 14:41:53+08:00
FileCreateDate : 2018:02:08 21:04:08+08:00
---- QuickTime ----
CreateDate : 2018:02:08 21:04:08
ModifyDate : 2018:02:08 21:04:08
---- Track1 ----
TrackCreateDate : 2018:02:08 21:04:08
TrackModifyDate : 2018:02:08 21:04:08
MediaCreateDate : 2018:02:08 21:04:08
MediaModifyDate : 2018:02:08 21:04:08
---- Track2 ----
TrackCreateDate : 2018:02:08 21:04:08
TrackModifyDate : 2018:02:08 21:04:08
MediaCreateDate : 2018:02:08 21:04:08
MediaModifyDate : 2018:02:08 21:04:08
Add the -api quicktimeutc option when extracting. See here (https://exiftool.org/ExifTool.html#QuickTimeUTC) for an explanation.
- Phil
Phil, thanks. It works very well.