"exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg -execute -if '$previewimage' -b -previewimage -w %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg -overwrite_original -common_args --ext jpg DIR
[Advanced] Extract JpgFromRaw or PreviewImage from all but JPG files in DIR, saving them with file names like image_EXT.jpg, then add all meta information from the original files to the extracted images. Here, the command line is broken into three sections (separated by -execute options), and each is executed as if it were a separate command. The -common_args option causes the --ext jpg DIR arguments to be applied to all three commands, and the -srcfile option allows the extracted JPG image to be the source file for the third command (whereas the RAW files are the source files for the other two commands).'
A. Kröner, G. Kahl, L. Spassova, T. Feld, D. Mayer, C. Magerkurth, and A. Dada. Proceedings of the Sixth International Conference on Intelligent Environments (IE 2010), Kuala Lumpur, Malaysia, page 164--169. Los Alamitos, CA, IEEE Computer Society CPS, (2010)
K. Kjær. Proceedings of the 25th IASTED International Multi-Conference: Software Engineering, Innsbruck, Austria, page 148-155. Anaheim, CA, USA, ACTA, (2007)
A. Katasonov, and M. Palviainen. PerCom 2010 Workshops: Proceedings of the 8th Annual IEEE International Conference on Pervasive Computing and Communications Workshops, Mannheim, Germany, page 696-701. (2010)