This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
exiftool [2022-05-27 15:19:41] mi [See also] |
exiftool [2026-01-28 18:55:27] (current) mi [Copy JPEG Comment to Exif UserComment] |
||
|---|---|---|---|
| Line 54: | Line 54: | ||
| exiftool -r -ext jpg '-FileModifyDate<DateTimeOriginal' /path/to/process | exiftool -r -ext jpg '-FileModifyDate<DateTimeOriginal' /path/to/process | ||
| + | |||
| + | == Copy JPEG Comment to Exif UserComment | ||
| + | |||
| + | For all .jpg files in current directory: | ||
| + | |||
| + | <code bash> | ||
| + | for f in *.jpg; do exiftool "-EXIF:UserComment<FILE:Comment" "$f"; done | ||
| + | </code> | ||
| + | |||
| + | == Read specific tag | ||
| + | |||
| + | Use ''-Tagname'' to read just a specific tag. Add ''-b'' (''-binary'') option to not print the tag name. But then, there is no linefeed either! This example prints the "Title" and the "Filename", separated by a Tab and it uses ''echo'' and subshells so that a linefeed gets printed (there must be a better way, but I don't know it yet). | ||
| + | |||
| + | <code bash> | ||
| + | for f in *; do echo -e $(exiftool -Title -b "$f" 2>/dev/null)"\t"$(exiftool -Filename -b "$f" 2>/dev/null); done | ||
| + | </code> | ||
| == See also | == See also | ||
| Line 59: | Line 75: | ||
| * https://exiftool.org/filename.html and the [[https://exiftool.org/faq.html|ExifTool FAQ]] | * https://exiftool.org/filename.html and the [[https://exiftool.org/faq.html|ExifTool FAQ]] | ||
| * This guy's Exiftool Cheatsheet : https://gist.github.com/rjames86/33b9af12548adf091a26 | * This guy's Exiftool Cheatsheet : https://gist.github.com/rjames86/33b9af12548adf091a26 | ||
| - | * And this even better one: [[https://ozzyczech.cz/bash/exiftool-tips-and-tricks/|Exiftool tips & tricks]] | + | * And this even better one: [[https://ozzyczech.cz/devops/command-line/exiftool-tips-and-tricks/|Exiftool tips & tricks]] |