Thursday, 24 May 2018

Exiftool batch for Sony Xperia media.

I have not found any GUI tool for Windows which will successfully rename both the JPG and MP4 files to created on my Sony Xperia XA1 Ultra to names matching the creation date according to the Exif data  embedded in the files.

The excellent exiftool console application works but there is an issue with the time stamp of the MP4 videos which appear to be interpreted as UTC.

My solution is the following batch file which increments the creation time of the videos by 9 hours (I am living in Japan) before renaming the files.

    exiftool "-AllDates+=9" -verbose -overwrite_original *.mp4
    exiftool "-filename<CreateDate" -d %%Y%%m%%d_%%H%%M%%S%%%%-c.%%%%le *

Obviously exiftool must be in your path for the script to work.

I run this script on newly imported files then copy them to my Photos directory.