Script Request – Check for Exif Thumbnails in Photos (JPEG)

Hello

I have over 30,000 photos in more than 3,000 folders and found that many lack thumbnails. I need a script that searches through all subfolders from a selected (marked) folder in Dopus to check if thumbnails exist in images.

The output should be a CSV file listing filenames and "EMPTY" if no thumbnail exists, or a text file with filenames and "EMPTY", both files separated by a semicolon. Subfolder names should precede filenames, if possible. The name of files containing thumbnails is of no interest.

Problems .
● I am unsure if there's a separate / single exif tag for thumbnails.
● I have manually checked with ExifPilot using these column headers:

/Exif/Thumbnail/ImageLength

/Exif/Thumbnail/ImageWidth

/Exif/Thumbnail/Xresolution

/Exif/Thumbnail/Yresolution

Some images only contain ImageLength/ImageWidth, others Xresolution/Yresolution, and some both.

Any help from script experts is appreciated.

Jøran Toresen

PS I know absolutely nothing about scripts.

Could you zip and post some example images, with and without thumbnails?

Thank you, I'm prepering a zip-file.
Jøran

Photos with and without thumbnails.zip (21.0 MB)

Files and documentation are in a text file.
Jøran

Hope this works, I have never uploaded files to this forum before.

ExifTool can detect image thumbnails via the EXIF-ThumbnailLength tag:

This add-in will enable Opus to search for the tag.

:one: Install it, then modify this line in the script from

exifColumns.push_back(GetColumnMap('EXIF', 'ThumbnailLength', '', '', '', '', '', ''));

to

exifColumns.push_back(GetColumnMap('EXIF', 'ThumbnailLength', '', '', '', '', 'right', 'number'));

:two: Optional: To see if it works, toggle the column with:

Set COLUMNSTOGGLE="scp:ExifTool/EXIF-ThumbnailLength(!,a,0)"

:three: To search for images without thumbnails, use this filter:

Copy this text to the panel

name match "*.(jpg|jpeg)" and script match ExifTool/EXIF-ThumbnailLength = 0

or save 54844.ofi to

%appdata%\GPSoftware\Directory Opus\Filters

:four: The Find results can be copied or printed for subsequent processing.

1 Like

@lxp Thank you very much!

As I said before: I know nothing about scripts in Dopus.
So I need some time before I can give feedback.
But I will report back if there is something I don't understand.

Jøran Toresen

@lxp You are a genius!

1. The script works as expected . I had problems in the beginning because I specified this folder in ExifTool Configuration. (I use this folder for other programs, for example GeoSetter.)

D:\Download Base\40 ExifTool\Current\

Later I realized that I had to specify the full path name including the filename:

D:\Download Base\40 ExifTool\Current\ exiftool.exe

The script reports the same results as ExifPilot. (The ImageLength reported by ExifPilot is smaller than the size reported by the script. Probably because the exif fields are different.)

2. Optional : To see if it works, toggle the column with:

Set COLUMNSTOGGLE="scp:ExifTool/EXIF-ThumbnailLength(!,a,0)"

Where to I “Set” this in Dopus?

3. Saved as favourite format . I have created a favourite format preset (Photos without thumbnail) where the columns EXIF-ThumbnailLength and EXIF-ThumbnailOffset are included.

But I do not know how to activate this favourite format when I want to search for missing thumbnails in a folder.

4. Toggle on and off the ExifTool toolbar . When I toggle the toolbar off, I have to Right-click the toolbar area and choose ExifTool. Is it possible to create a button that toggles this toolbar on and off?

Thank you so much for your quick response and valuable input.

Jøran Toresen

PS I have been using Dopus since 2006. But I haven't delved into the more complicated options available. It's time to explore all the possibilities.

That's a simple button:

How to use buttons and scripts from this forum

You could use a button or make it part of a Folder Type Format:

The button on the right of the toolbar does that. Copy it to a convenient place.

You'll enjoy the ride :slight_smile:

@lxp Alexander.

Thanks again. I will continue my "education". And you have given me very useful information.
Jøran