Working with files with double extensions

Started by pantss, March 05, 2019, 08:58:57 PM

Previous topic - Next topic

pantss

Hi. First of all big thanks for the tool. Used it to update the dates of my iphone photo imports.

Managed to change .jpg, mov, png.

How do I change Live Photos thumbnails with extension .THM.jpg ?

While this works:
exiftool -TagsFromFile %d%f.mov '-MDItemFSCreationdate<CreationDate' -P -ext .jpg

This doesn't:
exiftool -TagsFromFile %d%f.mov '-MDItemFSCreationdate<CreationDate' -P -ext .THM.jpg

Phil Harvey

Your command would try to copy tags from FILENAME.THM.mov files.

Try this to ignore the last 4 characters of the file name:

exiftool -TagsFromFile %d%-.4f.mov '-MDItemFSCreationdate<CreationDate' -P -ext .THM.jpg

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

pantss

#2
Hmm. I can't seem to get it to work.

1 directories scanned
0 image files read

I am actually trying to copy tags from .mov onto .THM.jpg with the same file name.
Also, if possible, I do not wish to edit FILENAME.jpg, only FILENAME.THM.jpg

Thanks again!

——

Tried these but failed.
exiftool -TagsFromFile %d%-.4f.mov '-MDItemFSCreationdate<CreationDate' -P -ext .THM.jpg
exiftool -TagsFromFile %d%f.mov '-MDItemFSCreationdate<CreationDate' -P -ext %-.4f.jpg

And most permutations of
%-.4f.jpg
%-4f.jpg
-4%f.jpg
%-4.f.jpg
-%4.f.jpg

Phil Harvey

I should have tried this myself.  The problem is that -ext .THM.jpg doesn't work because the extension is actually ".jpg".  Try this:

exiftool -TagsFromFile %d%-.4f.mov '-MDItemFSCreationdate<CreationDate' -P -ext .jpg DIR

This will also scan all regular ".jpg" files, but it won't find matching .mov files for these so it should be OK and won't slow things down too much.

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