ExifTool Custom Columns

I have a few, and have tried them all with double slashes

  • C:\exiftool\exiftool.exe
  • C:\Users\bri\scoop\apps\Exiftool\current\exiftool.exe
  • C:\Program Files\XnViewMP\AddOn\exiftool.exe

edit: think I figured it out; was using the buttons in the original post but it seems that they also have a line that needs updating!

edit2: it is working now. for those people that come in the future and are mystified; check that both the buttons and the ColumnExifTool.js.txt have the correct path. so in my case, my exiftool paths are above & in the js.txt I've made it:

// -- Adjust to your system. Copy the path to exiftool.exe with 'Edit - Copy Other - Copy Full Pathnames (Double Backslashes)'
var exeExifTool = fsu.Resolve('C:\\exiftool\\exiftool.exe');

// -- Adjust to your preferences. Use double backslashes.
var cacheFolder = fsu.Resolve('/profile\\ExifToolCache');

thanks! I'm not sure if it was different, but i changed it to var cacheFolder = fsu.Resolve('/profile\\ExifToolCache'); ; still fails bc of missing exiftool.

edit: ahh, I see the issue maybe; I was using your buttons above "Generate Exiftool Helper Files" so I could try to see what I was doing wrong, but I see that the buttons also have a var exeExifTool = fsu.Resolve('/bin\\exiftool\\exiftool.exe'); which I'd guess has to be resolved as well

Yes.

A good opportunity to update the helper button to reflect the new syntax. See the next post.

Update of the helper button Generate Helper Files. You will probably need to adjust the path to exiftool.exe (2023-03-14).

Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>Generate Helper Files</label>
	<tip>Generates .txt helper files for selected files</tip>
	<icon1>#newcommand</icon1>
	<function type="script">
		<instruction>@script JScript</instruction>
		<instruction>// 2023-03-14</instruction>
		<instruction />
		<instruction>function OnClick(clickData) {</instruction>
		<instruction>    var cmd = clickData.func.command;</instruction>
		<instruction>    var tab = clickData.func.sourcetab;</instruction>
		<instruction>    var dlg = clickData.func.Dlg();</instruction>
		<instruction>    var wsh = new ActiveXObject(&apos;WScript.Shell&apos;);</instruction>
		<instruction>    var fso = new ActiveXObject(&apos;Scripting.FileSystemObject&apos;);</instruction>
		<instruction>    var fsu = DOpus.FSUtil();</instruction>
		<instruction>    var exeExifTool = fsu.Resolve(&apos;/bin\\exiftool\\exiftool.exe&apos;);</instruction>
		<instruction />
		<instruction>    cmd.deselect = false;</instruction>
		<instruction />
		<instruction>    if (!fsu.Exists(exeExifTool)) {</instruction>
		<instruction>        dlg.Request(&apos;exiftool.exe not found!&apos;, &apos;OK&apos;);</instruction>
		<instruction>        return;</instruction>
		<instruction>    }</instruction>
		<instruction />
		<instruction>    cmd.RunCommand(&apos;Set UTILITY=otherlog&apos;);</instruction>
		<instruction>    DOpus.ClearOutput();</instruction>
		<instruction>    DOpus.Output(&apos;Enumerating...\n&apos;);</instruction>
		<instruction />
		<instruction>    for (var e = new Enumerator(tab.selected_files); !e.atEnd(); e.moveNext()) {</instruction>
		<instruction>        var item = e.item();</instruction>
		<instruction>        DOpus.Output(item);</instruction>
		<instruction />
		<instruction>        var fileTags = fsu.GetItem(item + &apos;-Tags.txt&apos;);</instruction>
		<instruction />
		<instruction>        var cmdLine = &apos;&quot;&apos; + exeExifTool + &apos;&quot; -short -duplicates -unknown -groupNames -tab -textOut! &quot;%0f&apos; + fileTags + &apos;&quot; &quot;&apos; + item + &apos;&quot;&apos;;</instruction>
		<instruction>        wsh.Run(cmdLine, 0, true);</instruction>
		<instruction />
		<instruction>        var tfColDefs = fso.CreateTextFile(item + &apos;-ColDefs.txt&apos;);</instruction>
		<instruction>        var tfColCmds = fso.CreateTextFile(item + &apos;-ColCmds.txt&apos;);</instruction>
		<instruction />
		<instruction>        var tf = fso.OpenTextFile(fileTags, 1);</instruction>
		<instruction>        while (!tf.AtEndOfStream) {</instruction>
		<instruction>            var line = tf.ReadLine().split(&apos;\t&apos;);</instruction>
		<instruction>            var group = line[0];</instruction>
		<instruction>            var tag = line[1];</instruction>
		<instruction>            var value = line[2];</instruction>
		<instruction>            var str = &apos;exifColumns.push_back(GetColumnMap(\&apos;&apos; + group + &apos;\&apos;, \&apos;&apos; + tag + &apos;\&apos;, \&apos;\&apos;, \&apos;\&apos;, \&apos;\&apos;, \&apos;\&apos;, \&apos;\&apos;, \&apos;\&apos;));&apos;;</instruction>
		<instruction>            while (str.length &lt; 140) str += &apos; &apos;;</instruction>
		<instruction>            str += &apos;// &apos; + value;</instruction>
		<instruction>            tfColDefs.WriteLine(str);</instruction>
		<instruction>            tfColCmds.WriteLine(&apos;Set COLUMNSTOGGLE=&quot;scp:ExifTool/&apos; + group + &apos;-&apos; + tag + &apos;(!,a,0)&quot;&apos;);</instruction>
		<instruction>        }</instruction>
		<instruction>        tf.Close();</instruction>
		<instruction />
		<instruction>        tfColDefs.Close();</instruction>
		<instruction>        tfColCmds.Close();</instruction>
		<instruction>    }</instruction>
		<instruction>    DOpus.Output(&apos;\n... done&apos;);</instruction>
		<instruction>}</instruction>
	</function>
</button>
2 Likes

I worked several hours learning to use this script today.
I'm still on the original version you posted, but I'll get it up to date soon.
I would have done this much sooner had I known what I know now.
One thing I would want to change is to have the Field of View displayed in radians rather than degrees and as a fraction of pi with a fixed reducible denominator.
Well, I need start learning Jscript.
Thanks very much !

I'll get it up to date soon.

Yes, you should, because...

I would want to change is to have the Field of View displayed in radians rather than degrees and as a fraction of pi with a fixed reducible denominator.

... the current version from February lets you easily do this, starting line 382.

If you get stuck, just whistle :slight_smile:

I love ExifTool Custom Columns, but I still don't know what 'Helper Files' are. Please explain.

There's not much to them. At which point did you get stuck?

Here, it just prints "Enumerating ..." writes the -Tags file and ... nothing more.
Also, I don't have the possibility to select some exif-made columns, unless I am missing something.


Thanks for your effort, btw. :+1:

Seriously cool, @lxp. Great work and well documented. Thanks so much!

Update 2024-01-11

  • Ready for Opus v13
  • Easier to install and configure. Just save two files to your config.
  • All buttons converted to commands
  • Ready-to-run Toolbar
  • Faster
  • More predefined columns

How to update an existing installation

:one: If you have column definitions you want to keep, replace

push_back(DefineColumn(

with

push_back(GetColumnMap(

then copy the lines to the new script.

:two: Remove the old script from the /scripts folder.

:three: All old script buttons have been replaced with commands and can be removed.

:four: Everything else should work as before.

4 Likes

Great upgrade !
Thankyou, your efforts are appreciated.

I had no trouble at all getting my normal photo columns working.
The new script did them out of the box. All I had to do was change the ExifTool.exe path and with the new configuration button, double \s were no longer needed.

I know I'll make some changes and also revisit my old buttons I used with the older versions of this script. But it made my morning that it worked so well out of the box !

1 Like

I have found a problem with how ExifToolColumns caches data.

The version I was using is the revision dated 2022-09-04.
Here is a screenshot of photo columns.

Everything looks great.

Something happened to how data is cached.
Here is a screenshot of the new version dated 2024-01-12 .

Perhaps something has happened to the data type ?
Edit: Removed zip attachment

Excellent work, @lxp. I discovered that my Samsung S23 Ultra video files have an extra QuickTime metadata field:

exifColumns.push_back(GetColumnMap('QuickTime', 'Subtitle', '', '', '', '', '', ''));

DOPUS picks it up in the Metadata pane, but not in the Rename function.

I added the line, above, to your script and I can now use it to rename files.

Thanks

1 Like

Yes. The cache is now written using the printConv option. From ExifTool's help:

-n (--printConv)
Disable print conversion for all tags. By default, extracted values
are converted to a more human-readable format, but the -n option
disables this conversion, revealing the machine-readable values.

If you prefer the previous style, remove the option from the script (line 194):

Replace

argFile.Write('--printConv\n' +

with

argFile.Write('' +

I'll add this to the configuration in the next version :+1:

I'll add this for the next version :+1:

Thanks !
I had it changed to my liking in five minutes.
Good thing, it was a blizzard here last night.
Now I have to clear a foot of snow and make paths for my dog.

Thank you lxp.
I feel like I must be missing something obvious, but where are the 2 files to download?

Check out the all-new first posting :slight_smile:

Got it thanks. I had looked there saw the date of 2021 at upper right of that post.