SOLUTION: JS script to rename the file extension to the extension specified in the Exif

Advanced Renamer forum
#1 : 21/10-22 16:08
Daniel Gruner
Daniel Gruner
Posts: 5
Hi! I noticed during a Google Photos export that images that were originally .HEIC and then converted to .JPG are still referred to as .HEIC by Google. The same is true for videos (.MP4 files with the filename .MOV). Maybe this has advantages for the Google Photos sync mechanism, but for my backups I want to use the real extensions.

That's why I wrote the following script that looks for the correct extension in the Exif files and renames the files accordingly.

return item.ext;
if(item.ext.toLowerCase() !== item.exifToolValue("FileTypeExtension").toLowerCase()){
return item.exifToolValue("FileTypeExtension")

21/10-22 16:08