Page 1 of 1

Search inside any exif field

Posted: 25 Mar 2026 01:28
by GUIguy
A while back I used a digital asset manager and tagged many many photos in different exif fields. I subsequently abandoned that program.

Regardless of which exif field is used I would like to search all of my image files for the word "irrigation."

Can do?

Re: Search inside any exif field

Posted: 25 Mar 2026 01:47
by highend
Via scripting and using get("exif"...)?
But with arbitrary field names, I wouldn't do it.

Use https://exiftool.org/ instead (ofc also via scripting)
Run it via runret() and then parse the output accordingly...

Re: Search inside any exif field

Posted: 25 Mar 2026 02:56
by jupe
Alternatively, if you are not up to scripting it, using the same exiftool you could easily extract all exif data into a csv, and then import it into a spreadsheet or csv app which would allow easy filtering/searching, and exporting filename results to be opened in XY. eg,

recursive example:
exiftool -csv -r "C:\path\to\images" > metadata.csv

Re: Search inside any exif field

Posted: 25 Mar 2026 11:42
by highend
E.g. (be in the (root) folder where you want to search for files containing the exif data):

Code: Select all

    $tool = "D:\Tools\@CLI Tools\exiftool\exiftool.exe";
    end (exists($tool) != 1), quote($tool) . <crlf 2> . "does not exist, aborted!";

    $find = input("Enter search term", 3:="e", 5:=250, 6:=150);
    if (trim($find) == "") { end true; }

    status "Running exiftool, stand by...", , "progress";
    $data = runret("""$tool"" -r ""<curpath>""", , 65001);

    $divider = "<:::::>";
    $pattern = "^========[\s\S]+?(?=^========|^\s+?\d+ directories)";
    $blocks  = regexmatches($data, $pattern, $divider);

    $files = "";
    foreach($block, $blocks, $divider, "e") {
        $file = gettoken($block, 1, <crlf>);
        $file = regexreplace($file, "^=+\s+");
        $file = replace($file, "/", "\"); // exiftool uses "/" instead of "\"
        if (strpos($block, $find) != -1) { $files .= $file . <crlf>; }
    }
    end (!$files), "No file(s) found containing the search term...";
    goto "vi:$files";