0

unfortunately I have created a small problem during my vacation. I did not notice that the autofocus was turned off on a camera lens. This, of course, I created some possibly blurred images. Well probably rather a lot of the pictures with the lens. To make the images easier to find, I wanted to rename them via exiftool. I saw that these have the autofocus tag set to off and tried to select them with an if, but unfortunately I failed. I would need help creating the command.

Thanks for the help in advance.

1 Answer 1

0

Use the command in Exiftool FAQ #3 to find the exact name of the autofocus tag. Then you would use the -if option to check that tag to see if autofocus was on/off/some other value.

You don't give any details as to what values the camera saves for the autofocus, nor exactly how you want to rename the file. For this example, I'm using simply ON and appending the autofocus value to the end of the filename. Replace TAG with the name of the autofocus tag you found with the above command The resulting command would be:

exiftool -if '$TAG=~/ON/i' '-Filename<%f_${TAG;}.%e' /path/to/files/

In the renaming part of this command, %f is the original file's basename (filename without the extension) and %e the extension. For more details on exiftool's % variables, see the -w (-TextOut) option. The semicolon [tt];[/tt] after the name of the tag will remove any non-filename safe characters (such as a slash, as that would create a new directory) from the tag name if they exist.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .