ExifTool Custom Columns

Ooh, a weirdness: If I also uncomment File:Bitspersample in addition to the File:Exifbyteorder, then the File category becomes clickable, and creates both columns properly in the lister!

And just to clarify, these aren't items I added in, they're from your originals just commented out or not.

By cache duration I meant how long before it refreshes the exiftool cache, if one doesn't use the Delete Cache button. (Your old version of the script had a line to set the duration).

And this is cool, getting real-time support, from Switzerland no less!

Right. The current version eliminates the necessity for that step. Now, the script conducts a per-file check and exclusively forwards modified files to ExifTool. This keeps the cache updated with minimal background activity.

Ah, I think I found an actual reproducible bug!
If the first item in each category is commented out, that category will not be selectable on the "Columns" dropdown.

To reproduce:
Comment out all the items.
Uncomment say the ASF:AudioCodecDescription line.
The ASF category will not be selectable on the Columns dropdown.
Uncomment also the ASF:AudioChannels line.
Now the ASF category is selectable, and both columns will successfully show in the lister.
Same for each of the categories. If the first item is something that was added and not part of the original script, it will also succeed in showing that category.

I can't figure out why, but I think this is what was causing my problems yesterday. I guess it could be something in my Preferences, but we'll see what you say. Otherwise, this script is brilliant.
TY.

The ExifTool groups are not categories for Opus (it'd be nice if they were or could be). Opus treats the columns all the same and puts them in one list. But if there is only one column generated by the script, Opus won't create an ExifTool submenu. Instead, it will place the column directly into the menu.

Two script columns

One script column

Hey, first a big thanks for your work, helps alot!
I am struggling with copying metadata of a selected file to clipboard.

I found this script in another thread but fail to adjust it to my needs. Is it possible to select custom metadata from exifTool in the tmp variable?

function OnClick(clickData) {
var tab = clickData.func.sourcetab;

var result = '';

for (var e = new Enumerator(tab.selected_files); !e.atEnd(); e.moveNext()) {
    var item = e.item();
    var tmp = item.metadata.audio.mp3songlength;
    if (typeof tmp == 'undefined') continue;
    result += tmp + '\n';
}

if (result == '') return;

DOpus.SetClip(result);

}

Appreciate the response. I was really just looking at the dropdown from Columns in the Exiftool toolbar that's created, since I use that to turn on or off the set of columns created by that category, e.g., to have the lister show all the ASF columns that I haven't commented out in columnexiftool.js. In this dropdown, ASF is grayed out if the first item in the ASF group is commented out. (This first item would also be the first item in that section of exiftool.dop, which I'm guessing is where the bug lies).

Not as easily as one would hope (true for all script columns). In this particular case, you could skip the script and use ExifTool directly, e.g.

@nodeselect
exiftool.exe -DateTimeOriginal {filepath} | clip

Set the button function to "MS-DOS Batch".


Here's a script that lets you copy the values of script columns:

https://resource.dopus.com/t/columns-viewer/47072

1 Like

What you see is Opus' regular behavior of marking buttons as unavailable because of the commands they contain and the lister state.

thanks a lot, got it working :+1:

Thanks.

I was having trouble with the Cache, which led to me causing other problems! I don't think the Cache has ever been deleted even though I thought I had been deleting it, so I deleted it manually as it was HUGE.
And that was the start of my playing with thing I shouldn't play with. I should have taken more screenshots before I changed things!

The unedited script has this path to the ExifToolCache: '/profile\ExifToolCache', so do I replace 'profile' with my user: '/megma\ExifToolCache' ?

The unedited script has this path to ExifTool:
'/programfiles\exiftool\exiftool.exe'
I have always had ExifTool.exe in my C drive, and not in my user, so should the path be edited to:
'\Exiftool.exe' ?

This is the old script shoeing the path to ExifTool.exe"
image

So sorry to bother you wit this!

The cache size is not a problem for the script; it accesses the cached data directly, and no search is going on. Assuming you have a large enough SSD, there is no need to worry.

You can place both the cache and the exe wherever you want; just tell the script about it in the config dialog, and the log will show you the resolved path the script uses. You are good to go if you don't see a red error message.

Thanks @lxp again for this script. Now I'd like to add a column to show the thumbnail image size. I think this would involve invoking the external exiftool program once for each file, and I haven't understood how to do that from forum examples.

The exiftool command is:

exiftool -thumbnailimage <filename> -b | exiftool -imagesize -

Because of the pipe, I don't think it can use exiftool's ability to process a directory, but rather I think it would have to be invoked for each file. I can tolerate the delay.

Not sure how to add that into the script, or if it's possible. If not, maybe a separate script to add it? TY again.

It would add complexity to the script because images can contain more than one thumbnail. I tried this some time ago and ended up extracting all thumbnails into a subfolder, and then running the ExifTool columns on them. Since then, I've never needed it again, so I didn't spend more time on it.

This time I don't have a quick solution. I ran

script match ExifTool/EXIF-DateTimeOriginal before 2024-02-01 00:00:00

and

script match ExifTool/EXIF-DateTimeOriginal after 2024-02-01 00:00:00

on some recent picture folders and everything was fine.

Could you send me some sample images and the filter or preset so we can compare the results?

TY again. I'll do that.

But as the general question then, can you point me toward a post that explains how to create a column that invokes an outside program on each file in a folder? I probably need a little more handholding than the intro posts on creating a column.

Column: Pandoc Word Count

These are the text versions of the filters. Great for sharing!

Maybe something's wrong on the right side of the panel?

I'd try to reduce the filter until it finds something. Can't think of much else.

I converted one of the .jpg files to .bmp and executed

script nomatch ExifTool/EXIF-DateTimeOriginal after 1900-01-01 00:00:00
and type match group Images

on the folders. The outcome was that single .bmp file.

The search speed should remain consistent across columns, as all information is retrieved from the same text cache file. ExifTool columns are expected to be among the fastest to process because they don't require access to the original media files once the cache is built.

I am still unsure where the issue lies... You just cleared the cache, I assume your exiftool.exe is current... Perhaps switching the logging to the maximum level could provide insights into what's happening.

Ignore this. I am deleting my posts on this subject.