SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

N1ck1
Member
Member
Posts: 14
Joined: 2022 Dec 01, 23:30

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by N1ck1 »

Tested the new release and it's performing great! Thank you so much for resolving my request, I really appreciate it!
And thank you for the explanations and for the warning to make a backup to save previous customizations before applying the new version.

I'm actually using the Name column from ES in x2 now because I think it's faster with populating the file icon image that's before the file name text.
I do like the way ES formats the Length column but I now see how that's a problem in x2 because the column is "left-aspect-justified" and doesn't properly/correctly sort the order... So thank you very much for also including the "alt:" option; that's working perfectly just like x2 and sorting properly.

One thing I ended up finding out is there seems to be a limit to the amount of entries allowed within the "ext:" option.
ES has Video and Audio filters (View > Filters > Right-click filter > Edit > Search: field) and they all can't/don't get imported into x2. There's no errors, it's just at a certain cutoff point whatever ext entries that are beyond, simply remain blank and don't get populated.

ES Filter Video Ext:
  • ext:3g2;3gp;3gp2;3gpp;amv;asf;asx;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv
ES Filter Audio Ext:
  • ext:aac;ac3;aif;aifc;aiff;amr;ape;au;cda;dts;fla;flac;it;m1a;m2a;m3u;m4a;m4b;m4p;mid;midi;mka;mod;mp2;mp3;mpa;mpc;ogg;opus;ra;rmi;snd;spc;voc;wav;weba;wma;xm
So for example, combining both Video and Audio ext into a Length.ES column for x2, not all entries get populated by a certain cutoff point:
  • alias:"Length" property:"Length" alt: ext:3g2;3gp;3gp2;3gpp;amv;asf;asx;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv;aac;ac3;aif;aifc;aiff;amr;ape;au;cda;dts;fla;flac;it;m1a;m2a;m3u;m4a;m4b;m4p;mid;midi;mka;mod;mp2;mp3;mpa;mpc;ogg;opus;ra;rmi;snd;spc;voc;wav;weba;wma;xm
After some tests I found the max amount of entries allowed to be, in this case to see "mp3" Length data in x2, as the following:
  • alias:"Length" property:"Length" alt: ext:3g2;3gp;3gp2;3gpp;amv;asf;asx;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;mp3
So not even all Video ext can be allowed let alone adding Audio ext into it.

Yet the "files:" option alone/instead does populate Length data for all files.
  • alias:"Length" property:"Length" alt: files:
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

N1ck1 wrote: 2025 Oct 04, 01:54 There's no errors, it's just at a certain cutoff point whatever ext entries that are beyond, simply remain blank and don't get populated.
In the windows API there's a common constant called "MAX_PATH" which is defined as the number 260, and it's often used as quick shorthand for "safe" buffer-sizes on the stack, so many simple buffers are quickly defined as "wchar_t Buffer[MAX_PATH]"... and you can guess what that happened then... :D

When I was writing the routines to parse the INI declarations it never entered my head that someone would write a line a thousand characters long... well, there you go, my mistake. I'll correct that later today. Apologies.

Incidentally, it's ironic because I love stress-testing things... one of the tests I did for this plugin was to have the INI define and create all 414 ES columns in x2 and then I activated all 414 columns at once in a single pane of x2, expecting it to laugh at my hubris and crash perfunctorily. Instead, it actually worked! It creaked a bit, and wasn't in any way fast or practical, but the monster didn't die! Every now and then even Nikos can get something right. :wink:
N1ck1 wrote: 2025 Oct 04, 01:54 ...and doesn't properly/correctly sort the order... So thank you very much for also including the "alt:" option; that's working perfectly just like x2 and sorting properly.
Before you start getting suspicious that something still doesn't look right, please note that these columns (despite showing numerical results) are actually expressed and rendered textually, which means they can never sort correctly, for more than one reason. I know "it seems to work", but it's not something that can be relied upon. There is the keyword "raw:" (which is used on the default columns) and that takes the number and expresses it in a numerical column, not a textual one. Even that won't sort correctly (very long explanation as to why), but it can at least be dynamically searched (for ranges, etc), and that's why it's there. In an extreme example, a user could take the raw: data and process it in an x2 programmable column and present it any way they like, but most people wouldn't do that, so I do what I can.

I don't like these limitations any more than anyone else, but it's outside of my bailiwick - I work in the medium I'm given. :cry:

That being said, the idea of any column is to present correct information, and in that, at least, it does work. I try to spell out all the caveats, but sometimes it's difficult to explain "the why of it" when I mostly concentrate on the "how". :D
N1ck1 wrote: 2025 Oct 04, 01:54 alias:"Length" property:"Length"
"alias:" is just an optional keyword intended for using a different name (like a linguistically localised-term) that the user prefers, rather than the default. If you leave it off, the column-name will just be the property name itself. It's there just in case a user has a fetish and they like to share the doldrums of their working day with "Fredericka", "Allison", "Silva", and "Annette". Some people like that sort of thing. (Old girlfriends, it seems, can serve more purposes than just being harbours of emotional regret and loss! :roll: )

Anyway <cough>, I'll look into that buffer thing...
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Code: Select all

Changelog for 3.0.1.1

Fixed: Allocated parsing buffer (INI) was insufficiently sized for very long delim & param declarations (extended to 2K)
Fixed: Format logged hashes as %016llX
Fixed: Missing plugin version in status bar notification
If your current INI was created by 3.0.1.0 then this update won't rewrite it, so no backup needed.
N1ck1 wrote: Yet the "files:" option alone/instead does populate Length data for all files.
I should mention that you probably don't want to blindly assign something like "Length" to all files as the plugin is type-agnostic, so it will happily try and extract that property from any file it sees, pictures, pdf's, zip's, etc - it's only constrained by your, ahem, excessively long lists - which in this case is a good thing! :D Technically you'd only be losing around 1-2 milliseconds per wasted effort, but still, it can add up. :shrug:

I must be a really boring person, since all my video files are mp4's and mkv's - never saw the need for anything else considering compression is so good these days.

Enjoy.
N1ck1
Member
Member
Posts: 14
Joined: 2022 Dec 01, 23:30

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by N1ck1 »

Tested and passed with flying colors! Wow, you went above and beyond in helping out, again, thank you so much! :party:
Kilmatead wrote: 2025 Oct 04, 07:01 When I was writing the routines to parse the INI declarations it never entered my head that someone would write a line a thousand characters long... well, there you go, my mistake. I'll correct that later today. Apologies.
Sorry for the hassle...but that's pretty funny! I have a knack for stressing out stress testers. :laugh:

For the columns I've replaced x2 with ES, I haven't yet encountered any issues with simple column sorting; so all good in my neighborhood, so far!

This plugin and the idea behind it to use ES index data to help boost performance was freaking genius! I have no idea what I'm talking about, but I wouldn't be surprised if other file managers "steal" this plugin or maybe even start keeping their own local index service...

But this plugin has now grown so much bigger than the initial "SizeES" capability. Maybe all new rebranding is in order?
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

N1ck1 wrote: 2025 Oct 05, 19:06 ...I wouldn't be surprised if other file managers "steal" this plugin or maybe even start keeping their own local index service...
I don't know of any file-managers that have gone through the trouble of actually creating their own indexing service as that's an extreme amount of work, though there's a reason many FM's have integrated ES to varying degrees (Dopus had a nice little innovative idea to use it for making its progress bars more efficiently accurate when processing large groups of files).

But there's no thievery involved - don't forget this is built off the plugin framework from Total Commander after all. In fact I gave permission for the author of a Windhawk mod that brings ES folder-sizes into Windows Explorer to take whatever parts of my code he wanted, despite the fact that he is a heathen C++ developer. (Nobody's perfect :wink:) He especially likes that I go through the trouble of stripping the ES SDK down to only the necessary code (for what we use), and we've been tracking each other's progress since.

None of the others have gone to the same degree of detail that we have (like supporting reparse-point sizes, which ES doesn't do by itself), and even the Windhawk lad hasn't gone to the same niche extreme for supporting (what I call) reparse-"tree" sizes, at least not yet. I'm just weird that way, I guess. :shrug:

At first I was thinking that adopting the ES columns themselves would just be more of a lark than anything useful, but it would appear they may have some practical value in speeding up people's network browsing (which is what I'm assuming you're using it for?) - so hey, all the better! I don't have a network myself, so I was unaware of just how p-a-i-n-f-u-l-l-y s-l-o-w they can be for properties in 3rd-party file managers (and I grew up with a 300-baud modem, which you'd have to experience to truly appreciate the horror!). :D
N1ck1
Member
Member
Posts: 14
Joined: 2022 Dec 01, 23:30

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by N1ck1 »

Kilmatead wrote: 2025 Oct 05, 19:58 ... it would appear they may have some practical value in speeding up people's network browsing (which is what I'm assuming you're using it for?)
Surprisingly not...I'm actually trying to utilize this plugin to gain a performance boost on external connected USB hard drives (one SSD and one HDD). When accessing/browsing/scrolling through a folder with tons a video files (mp4/mkv/ts) or a folder with tons of executable/compressed files (exe/msi/7z/zip/rar), x2 would completely freeze up, stall, and often lead to Windows thinking it crashed but I would click "Wait" and after minutes it would eventually unfreeze. Still have to go through the paces some more but utilizing the plugin seems to be a big improvement, especially in stopping the freeze ups.

Not a problem with the plugin but I was pulling my hair out trying to resolve an error stopping x2 from starting in my cockamamie way. I have an AHK script to automatically start several programs after logon and even though ES was started x2 would error. I finally figured out I had to split the script into parts with some running as admin and some running with UI Access. Whatever, it's finally resolved and I got ES and x2 to auto start now without a hitch.
https://i.postimg.cc/nLJy2hFf/x2Error.png
Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Haven't seen one of those for awhile... xplorer2_CommPort errors are related to "replacement mode" and the attempted launching of multiple instances. Like a pile of excitable puppies all clambering over each other just to get hoodwinked by a slippery tile-floor and end up flat on their furry little faces.

If it keeps happening, either try disabling replacement mode, or use:

Tools -> Advanced Options -> Global Tab -> "In replacement mode don't stay resident after all windows are closed"

For future reference, I should mention that this plugin requires (if importing custom columns) Everything Search to be already running (before x2) when it initialises to establish the pipe connection. It won't crash or hang if it isn't, but it won't be happy either, and you'd need to restart x2 so the plugin can "try again" to get its ducks in order. Sprinkling a few sleep-type delays throughout startup scripts can also help. At user logon it isn't just commport puppies that want attention, it's lions and tigers and bison too!

The fate of the puppies lies in your hands. :wink:
N1ck1
Member
Member
Posts: 14
Joined: 2022 Dec 01, 23:30

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by N1ck1 »

I luckily haven't encountered that error since making my startup changes, but thank you for that useful information in case I ever do again.

So unto the next issue... :laugh:
It's like playing Whac-A-Mole, I whack one thing down and a new one pops right up! It's not a problem with the plugin, I presume it's just how x2 handles "outside" information.

I had updated x2 at the same time as updating this plugin so I initially thought the following issue was with a new x2 feature being implemented and would further search on how to disable it after properly setting up the plugin.
The pesky "new feature" as I thought, was when renaming a single item (file or folder), a new x2 mini rename dialog would popup instead of renaming the item right within the pane, and the new popup wasn't following the unchecked advanced option 'rename selects whole name' to boot. So I go to search the forum thinking people must be asking how the heck do you disable this new rename popup box, and nothing found, oh no, it must be me using the Name.ES column instead... I go and switch to a saved non-ES column set and try renaming an item, no popup box, the renaming is right within the pane and the file extension isn't selected, all as desired; I then switch to my new Name.ES column set, try renaming an item, and bam, the pesky popup box, damn!

This outcome is a bit unfortunate, the popup box would be actually be a workable compromise to deal with, but the inclusion of selecting the file extension as well is way more of a hindrance. I don't presume the rename popup box can be done away with while using the Name.ES column because even though it's within x2 it's technically sourcing the information outside x2 and that's how x2 handles it; but I would presume that since the popup box is an x2 dialog it could be made to follow the advanced option 'rename selects whole name' or not, if the powers that be choose to...?

I was SO close to perfection! :hehe:

Primary rename functionality:
https://i.postimg.cc/wv7dPC3B/x2-Rename-1.png
Image

Secondary rename functionality:
https://i.postimg.cc/WzZcp0G4/x2-Rename-2.png
Image

Window Spy Info:
https://i.postimg.cc/L6dMC0S9/x2-Rename-3.png
Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

N1ck1 wrote: 2025 Oct 12, 00:16 I presume it's just how x2 handles "outside" information.
Actually, it's how x2 handles anything in the "first column slot" (that isn't x2's own 'Name [S]')- were you to put x2's "date modified" property in the first place, you would encounter the same problem. It's the modal from the "File -> Rename" menu-selection, which for some reason defaults to highlighting the whole name.
N1ck1 wrote: 2025 Oct 12, 00:16 I would presume that since the popup box is an x2 dialog it could be made to follow the advanced option 'rename selects whole name' or not
Most certainly it could, as that would be most reasonable. But... at the risk of repeating myself (how could I not when I'm quoting myself?):
Kilmatead wrote:Complain to Nikos. Loudly. Vociferously. Plead with him. Bribe him. Threaten his soul's eternal equilibrium. I threaten his soul's eternal equilibrium every day and he just laughs at my taunts, dismissing my all too human desperation like a wisp of wind in the fog of life.
If you know anything about windsurfing, that's his life's passion, so if you can somehow get him into an animated conversation about it, he'll purr like a cat that you scratch behind the ears. That's all the advice I got.

"So, Nikos, dude, hangin' way-cool, yeah? How about that big windsurfing championship happenin' in Australia? Are you goin'? I reckon you might win! Oh, and by the way, I got this renaming thing that could benefit from your world-renowned expert cat-like windsurfer perspicacity..." :shrug:
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

this dialog for entering generic text is used for 100 things in xplorer2, so it cannot select just the basename sui generis
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

But that's what the option says, gov'nor! Your option! "F2 Rename" is even explicitly mentioned in the text of the option. You gotta do what the fat lady says!

Code: Select all

LPWSTR nikos_wisdom = wcsrchr(nikos_brain, L'.');
*nikos_wisdom = L'\0';
Who knew NUL could be so descriptive of personality when looking for "the point" of it all? :D

x2 obviously knows WHY it's being called (since the filename appears), so how tough can it be to derive your motivation in the scene, Sir Lawrence?
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

that's the fast track to un-maintainable code, minute exceptions for petty fetishes ;)
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

It's not a fetish to expect an option to mean what it says. If I see this:

Image

I think to myself, hey, self, I just hit F2, and it obviously should not look like this:

Image

What's going on here? The option doesn't say "Well, under SOME conditions (which we won't tell you about) this may or may not have the expected outcome."

Now, it would indeed be a fetish for me to EXPECT such a disclaimer, because that would be weird and you'd just say "Well, logic only applies to the stuff I say it applies to, not what the user thinks it applies to, so I'm not going to bother with giving a clear explanation."

Would you prefer I just offer you a bribe of some crazy sailboard wax made by "Specially Cultivated Himalayan and Guatemalan Virgin Bees?" I mean, hey, if that's your thing, THAT would be a worthy fetish indeed. :wink:

If one extra if() statement with a comment or two leads "inevitably" to unmanageable-code, well, what kind of Raskolnikov-esque Ice-Cream Parlour are we running here, Comrade? I'll have the flavour of Guilt mixed with Innocence? No little girl is going to ask for THAT flavour! She's going to demand the sweet taste of Clarity & Expectation! Not your sour insistence that Bitterness & Confusion has the more piquant bouquet!

Obviously:

Image

...leads to happy bouncy pigtails dancing out of the shop with glee in her eyes. The other just leads to the grumpy and cheerless old proprietor murmuring "fetish this, fetish that" in his dementia as he sweeps the now empty floor of his once bustling shop.

Let not thy ambition lead to this! Remember when Vanessa's butterflies glittered with all the colours of the sun? Was that a fetish? Or a glorious wide-eyed wonderment that only exists in the memory now that you've fully embraced the curmudgeonly negativity of a discarded old man?

You should have just gone for the bribe, dude, beeswax is a lot easier than putting up with me! :D
Johann Pachelbel (1653-1706), a German composer and organist, received much recognition during his lifetime. The early years of his private life were also extremely successful: he married a beautiful woman, the daughter of the mayor of Erfurt, and they had a son. However, shortly afterwards, his wife and son died of plague. Pachelbel’s first published collection of works was titled Musicalische Sterbens-Gedanken (Musical Thoughts on Death). All of his compositions from that point onwards were meditations on overcoming death. Step by step, through this music, we come to understand that death is not the end, nor a transition into non-existence. On the contrary, it is an entrance into a realm where there are no temporary phenomena subject to suffering and decay, no parting, and no fear – a space where nothing obscures the light.
Do you think Pachelbel whined and worried about "unmanageable compositions"? He did not! He had seen the darkness and chose to fight it with ice-cream and positivism!

How could you even imagine choosing the lesser path?

Let an option be all that it can be! Let it express itself to the full extent of clarity and functionality!

Let us not fall into the wishy-washy world of ho-hum that YOU inhabit!

Image
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

"F2 selects only the base name" is meant for inplace rename, and it works there. The command you are referring to is called CHANGE TYPE, which if anything should select the extension ONLY (to be logically aristotelian)
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Methinks, with all due logos and empiricism, the end-user would always consider (nay, expect!) rename to be rename (not "re-type") no matter the context, and especially not be bothered by whether Aristotle "conditionally" bathed that day in Plato's "Eau de The Thing and Its Essence".

In this case the modal is being foisted upon the user as "in place" rename is not possible, so it's not like they have a lot of choice in terms of expectant recourse.

We will not limit ourselves to using your software only the way "the man" tells us to! Attica! Attica! Attica! :D

Image