What I'm trying to achieve is the following
exiftool -tagsFromFile tagsfile.txt image.jpg
TAGSFILE.TXT
XPTitle="Title here"
XPSubject="Subject here"
XPComment="Comments here"
I'm aware -tagsFromFile is from pulling existing tags from an image. Is there a way I haven't found to apply specific tags to an image from a text file?
Help massively appreciated!
While I'm not sure its possible within ExifTool, I've found the following line in a batch file works for anyone struggling with the same issue
for /F "tokens=*" %%A in (tagsfile.txt) do exiftool.exe %%A image.jpg
tagfile.txt is the same structure as in OP.
You can't user -TagsFromFile to pull tags from a text file, but you can the text file to directly write the tags using the -@ option (https://exiftool.org/exiftool_pod.html#ARGFILE).
Just change your text file so that it has the actual commands, one per line, without the quotes, like this:
-XPTitle=Title here
-XPSubject=Subject here
-XPComment=Comments here
and then call it with a command like this:
exiftool -@ /path/to/TAGSFILE.TXT FileOrDir
It's going to be much slower to run exiftool in a loop like your second post. That's Common Mistake #3 (https://exiftool.org/mistakes.html#M3). The startup time is exiftool's biggest performance hit and if you run it individually on hundreds or thousands of files, it'll take much longer than running it once like my example.
Yeah, that's significantly better. Thanks StarGeek.