GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Filenames that display as three columns

#16

Interesting idea, Mr C.

Regards, AB

#17

I know some of you have posted (recently in fact) about this very same topic - around having a way to specify a custom sort.

I think a bit of what MrC has suggested here makes the most sense... where perhaps users could specify one or more user defined fields that could be added to the list of sortable column fields and have their values calculated by Opus based on criteria the user could enter - which in most cases would probably be some sort of regex action. Then, as Konrad suggested, you don't need to actively modify file metadata every time you want to take advantage of such a thing.

That said, I think it's worth pointing out that you can already add custom columns and other sorts of things to Opus via a VFSPlugin. So, while there are fewer ppl out here with the skills or inclination to do such a thing - GPSoft might prefer to leave this sort of thing to that interface rather than coding everything directly into Opus themselves. Let's see what they say - I don't recall their comments on the previous threads some of you had going on the whole 'custom sort' topic... One that that might be interesting if someone were to write such a thing would be if GPSoft might then consider allowing us to turn OFF the regular filename column - which I've wanted to do in the past when printing folder output to a file and other scenarios...

I've started and abandoned like 4 different plugins over the years... this one seems fairly straight forward - so maybe I'll dabble now that I've tried my hand at a bunch of scripting projects. I'll see about grabbing one of the VS Express packages from MS this weekend - I think they're still free for personal use...

#18

You could write a VFS plugin that changes what's in the filename column (when you view a folder via the plugin's URL prefix), which will get you custom sorting. No need to turn the column off and populate a different column; change what's in the main column instead.

#19

Yeah, it occurred to me later that I was locked in on a heavier-weight solution that I'd used 20 years ago, with a virtual file system view. And was going to follow-up on my post (but got busy in a meeting), adding that a far better solution would be custom expression columns for a view (I use these all the time in JRiver's Media Center, and they are awesome). Some basic functions, including regular expression replacements, with access to metadata fields, would really add some neat power here.

#20

If you want to add a custom column, rather than change what's in the name column, a standard shell extension can do that and is probably less work than writing a VFS plugin.

(IColumnProvider extensions are still supported by Opus, even though Explorer ignores them from Vista onwards).

#21

[quote="leo"]If you want to add a custom column, rather than change what's in the name column, a standard shell extension can do that and is probably less work than writing a VFS plugin.

(IColumnProvider extensions are still supported by Opus, even though Explorer ignores them from Vista onwards).[/quote]
I would think a VFS plugin that could make configuration options available to the user through Opus' interface so that they could add their own expressions that the plugin could then use to determine exactly what to show in a custom column would be alot more flexible. I guess there's no reason a standard shell extension couldn't operate off of some basic config file a user could edit themselves either... but, well it's nice to keep it in Opus :slight_smile:.

I don't know that I'd want to use the plugin to override what's shown in the regular filename column... How would we turn that on and off when desired? Disable the plugin?

#22

I'd think this is some functionality that GPSoftware would like to make available to everyone w/out having to install (nasty) plugins and extensions (leo balks about Active{perl,python}!). Especially since it could make DOpus' metadata fields available as operands.

But I can understand the resistance: it will require the ability to add a new expression column type, an expression editor, an expression language, an expression parser, and an expression evaluator. Some of this is already available in the Rename dialog, but the project would be much large than just grabbing a few pieces from there.

#23

I've been thinking about the possibility of adding the ability to generate column data via scripts (e.g. a script add-in could add columns with an AddColumn method similar to AddCommand, and populate the data with an OnGetColumnData method). I'm just not sure how well it would go performance-wise.

#24

Without knowing how easy/difficult it would be to implement, how about a standard built-in LocalName column which maps to the normal Name column using a rename expression that can be specified via an Old Name / New Name option in Prefs. By default it would make no change, so LocalName would be exactly the same as Name, but the user could specify a transformation - e.g. a Regex - to be applied such as the one Steje proposed earlier in this thread to satisfy the OP's request.

Old name: ([0-9][0-9][0-9][0-9][0-9][0-9]) ([0-9][0-9][0-9][0-9][0-9][0-9]) (.*)
New name: \2_____\0

Regards, AB

#25

@ jon: Thanks for sharing your thoughts on this. My initial hunch was that on any modern machine, performance would be fine, solely based on the performance I've seen w/the Rename dialog doing real-time updates in the Preview Window which calls an external script once per file, for each character typed. I can't say I've tested thousands of files, but hundreds were fine. I hope you have some energy for some proof of concept trials some day soon.

@ aussieboykie: You're killing me with that monster:

Old name: ([0-9][0-9][0-9][0-9][0-9][0-9]) ([0-9][0-9][0-9][0-9][0-9][0-9]) (.*)

Use:

Old name: (\d{6})\s(\d{6})\s(.*)

:slight_smile:

#26

I was just plagiarising steje. :smiley:
With my level of Regex skill, a personal attempt would have been really embarrassing! :blush: :blush:

Regards, AB

#27

[quote="MrC"]@ aussieboykie: You're killing me with that monster:

Old name: ([0-9][0-9][0-9][0-9][0-9][0-9]) ([0-9][0-9][0-9][0-9][0-9][0-9]) (.*)

Use:

Old name: (\d{6})\s(\d{6})\s(.*)

:slight_smile:[/quote]
That was my fault actually... for some reason I had weird results when I tried something similar - hence my comments earlier in the thread about my use of "QUANTIFIER token" not working as I'd expected. But I guess I was just goofing on the syntax or something, as it works fine with your expression......

Well, if you limited it to just regex type stuff against the filename and maybe even standard file system attr stuff rather than metadata, I'd agree with MrC's comments about performance most likely being fine... and I think that'd also suit most of the peoples needs who have been asking for this sort of thing.

If you did indeed look at providing support with metadata on the other hand... well, then I think you're right to be concerned about performance. I'm not looking to insult Opus metadata handling or anything - but honestly, the performance with just 5 or 6 of the usual mp3 fields as columns is atrociously slow, at least compared to what I'm used to with tagging tools (mp3tag here). I'm sure dedicated tagging tools do whatever they can to optimize their tag reads considering that's what they specialize in - but on an SSD I'd have expected what I'm seeing in Opus to be ALOT faster.

#28

Performance of MP3 metadata is slow in every program that handles it (unless the data is then cached), which tells me it's a problem inherent to the file format and Windows filesystem, not Opus.

#29

I hear what you're saying - but BEYOND doubt, my experience with Opus when clicking into a folder is that tag reads are several orders of magnitude slower than other tagging tools (again, using mp3tag here which I esteem to be very good even compared to other taggers). Even if I give mp3tag the first shot (though who knows if whatever it does might actually be of any cache related benefit to Opus), and try Opus afterwards...

I'll start a new thread to show you what I mean... as I don't want to pollute this thread much more with a side topic mentioned only in response to the performance concerns in custom column ideas. I've stopwatched it, and the difference is incredibly obvious. I recall mentioning it in the v10 beta's - but haven't really mentioned it since because I just don't use it very often. But since we're going here now.... :wink:.

#30

Actually... going back over my old reports, it looks like I did NOT encounter this during the old v10 betas, but at some point later? Hmm... anyway, another thread. Going to try and show some extreme examples.

#31

I just had a revelation simply from trying to create an extreme example in video... see: Mp3 Metadata - extremely slow performance under Libraries

Issue is different than I thought it was. Should have piped up more about this years ago :slight_smile:.

#32

IColumnProvider extensions

Where can I find info on this in the Opus 11 help?
Bob

#33

It's a Windows API. Information about it is in MSDN, but you'd need to know how to write C++ code to write a shell extension.

#34

[quote="amerifax"]My filenames display as three columns.
080813 429344 67181.jpg

Currently when I sort its contingent on the first column, 080813, and everything thereafter. My directories holds several thousand records. My need is to be able to sort on the second value in the filename, 429344. I doubt if it matters, but I am using "File Filter Box" to search on different values.

How is it possible to have the second column of the filename sort. All the columns are equal, and always in the same place. So my filename has three values that have the following size.
080813 first column of the filename always six character.
429344 second column and always has six characters
67181 third column and is always five characters.

The use of the word columns in my above example is actually not columns, but yet they are, if that makes sense.

Bob[/quote]

Version 11.5.1 allows this.
This post should get you started Custom Column - "Custom Text Columns"

#35

Hi amerifax,

I made a quick version of RegexColumnsReloaded for your files.


Download the Script
AmerifaxColumns.js.txt (10.9 KB)

Ever since seeing wowbagger's original column script I've been a convert to regex columns. This one that I made has some advanced features, but your column definitions are really simple:

[quote]'N1' : {
pattern: /^\d+/,
},

'N2' : {
pattern: /^\d+ (\d+)/,
group: 1
},

'N3' : {
pattern: /^\d+ \d+ (\d+)/,
group: 1
},
[/quote]

This is fun for me so let me know if you need some help tweaking (adding columns etc.)
:smiley:

Installation

  1. Enter the Preferences menu
  2. Open the Scripts page in Prefs.
  3. Drag and drop AmerifaxColumns.js.txt on that page. Apply, OK.
  4. In a lister, right-click a column heading and select Script / AmerifaxColumns / Amerifax_N1.
  5. Repeat for Amerifax_N2 and Amerifax_N3.

Ignore the other column names, they are sample columns. You can delete them from the script if they bother you.