Main Menu

Invert selection

Started by ewg, August 09, 2011, 04:42:58 AM

Previous topic - Next topic

ewg

Is there a way to invert a multi-file selection in the ExifToolGUI? (A simple key shortcut would do, eg. Ctrl+I? 8))

I usually shoot with two non-Canon lenses and change my photos' LensType tags prior to their DPP processing. Having selected multiple files of one LensType in the GUI (often not a continous selection) I find it tedious to repeat the job for the remaining files (the other LensType).   :-[

I don't want to modify 'Exif: LensInfo from Makernotes' to sort the list according to 'Lens used'..... or do I have to?   ;)

Phil Harvey

Is it possible to just select all images and use an exiftool -if condition to process only images from the desired lens (maybe with the "exiftool direct" feature)?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

I'm quite sure, that -if should work in "exiftool direct". And because there's an option in GUI, to save predefined commands, this seems to be the simplest (longterm) solution. Workflow would be like:
1. You select all files
2. You choose first predefined command (valid for first lens) and execute
3. While all files are selected, you choose second predefined command (for another lens) and execute
..and finished... without typing anything (if I'm not mistaken). Now, the only thing you need are correct commands...

Another solution is (not that elegant as above, though): You select all files, and choose Modify>Exif:LensInfo from Makernotes menu. After this is executed, you choose [Detail:] [Camera settings] view on top of filelist pane. You will notice, among others, a column "Lens used" will appear in filelist. By clicking on column title, files will be sorted (grouped) according to lens used... and easy to select.
After you modify them (modify LensType), you should re-run Exif:LensInfo from Makernotes, so Exif lens tags will be updated according to lens data you've entered.

Bogdan

ewg

Than what would be the single direct command for changing LensType tags of ONLY a "LensType X" AND modifying ShortFocal & LongFocal tags accordingly out of a given selection? ???

Well, that is definitely a looooong term solution indeed.  Thanks anyway!  :D

Phil Harvey

I'm not sure I understand completely.

I was assuming that there was some difference in the metadata between the 2 lenses (focal length for example).  Then something like -if "$lenstype eq 'something' and $focalLength==50" would work. You ccould then easily write whatever other tags you want to files satisfying this condition by adding things like -shortfocal=15 to the exiftool direct arguments.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

I assume, if using two non-Canon lenses, then these two don't have equal LensType number.. thus, one could distinguish them by that number.

Bogdan

ewg

So I have to know these lens numbers (not just LensType full names) to write the command? I suppose the GUI's 'Show tag Values as numbers' switch would be my translator here?

And yes, my lenses differ in LenType and FocalLength and do so both before and after tags modification.

Phil Harvey

If the lens is unknown, the name will show up as "Unknown (xx)", or if it is mis-identified the wrong lenstype name will be reported.  You use whatever string is reported for LensType in your -if statement.  Alternatively, you can use the number if you want by appending "#" to the tag name, but it doesn't sound like you want this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ewg

#8
-if "$lenstype# eq 131" -lenstype#=240 -shortfocal=17 -longfocal=55
-if "$lenstype# eq 153" -lenstype#=49 -shortfocal=55 -longfocal=250

I've saved these two presets into the GUI as predefined commands and they seem to be working fine! This is even faster than the inversion thing I dreamt of!  :D

Please confirm the strings are safe or optimal. Thank you so much!  :)

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).