I am writing an metadata update script, which obtain src name from dst name by cleaning comment and change path e.g.:
dst="indie-2010/big_pictures/0003_CRW_7241-Nadrazi-v-Dilli.jpg"
src="original_images/2010-08-12-Indie/0003_CRW_7241.jpg"
update_script:
ls -1 | while read dst ; do
src=do_substring(dst, find_position(dst, '-'));
exiftool -all= -tagsfromfile "$src" -exif:all "$dst"
done
It works fine, but I want to run this at once as a batch (because executing exiftool for each file is slow) and I don't know how to pass two arguments per one file ... Is it somehow possible?
Thanks, Jiri Humpolicek
Hi Jiri,
I don't know what you mean my 2 arguments per file, but you could try something like this:
rm args.tmp
ls -1 | while read dst ; do
src=do_substring(dst, find_position(dst, '-'));
echo "-all=" >> args.tmp
echo "-tagsfromfile" >> args.tmp
echo "'$src'" >> args.tmp
echo "-exif:all" >> args.tmp
echo "'$dst'" >> args.tmp
echo "-execute" >> args.tmp
done
exiftool -@ args.tmp
rm args.tmp
- Phil
Hi Phil,
that is exactly what I wanted. I missed -execute option.
Thank you very much, Jiri Humpolicek