Hi.
I realized only now the possibility of creating a custom column.
I would like to create a column that returns the number of characters of the file name excluding the extension.
Something similar to the "path length" column but without the path character count.
I looked at some examples but I did not understand how to do it.
For example, can I call some opus directory function in the script, or is it better to directly count the characters by creating a function?
It's a very minor point but, for what it's worth, you should be able to use name_stem with the directory case as well. Opus doesn't consider directories as having extensions (in most situations), so name_stem will (should!) always return the full directory name, even if there is a dot in it somewhere.
if (scriptColData.item.is_dir)
scriptColData.value = scriptColData.item.name.length;
else
scriptColData.value = scriptColData.item.name_stem.length;
I'm now back from work.
I tried the script with the latest version of the function and everything works perfectly. And reading the post I begin to get an idea of what to do and how.