Hi everyone,
I am looking for a solution to process the following command to several files in a directory:
exiftool -TagsFromFile File.jpg File-NoExif.jpg
The files are something like this:
File1.jpg File1-NoExif.jpg
File2.jpg File2-NoExif.jpg
File3.jpg
File4.jpg File4-NoExif.jpg
If there is a file containing "-NoExif" in the filename, the command should be executed and copy all exif tags from the "normal" jpg to the "-NoExif" jpg.
Is it possible to manage this with Exiftool alone?
Try
exiftool -if "$Filename=~/NoExif/" -TagsFromFile %d%-.7f.%e -EXIF:All /path/to/files/
First, it checks to see if "NoExif" is in the filename. Then, it will look for a file to copy from in the same directory and snip seven characters from the end of the base filename.
Change the double quotes to single quote if using Mac/Linux.
Thanks. Do I have to change something when working with Windows?
exiftool -if "$Filename=~/genErase/" -TagsFromFile %d%-.9f.%e -EXIF:All D:\Bilder\Neu\Exiftool\Test\
The following message is shown when executed:
D:\Bilder\NEU\exiftool\Test>exiftool -if "$Filename=~/genErase/" -TagsFromFile -.9f.All D:\Bilder\Neu\Exiftool\Test\
File '-.9f.All' does not exist for -tagsFromFile option
Solved: Needs %% instead of % Works now perfectly, thanks again!
FAQ #27 (https://exiftool.org/faq.html#Q27)