Forget the Subfolder stuff, and try setting the filter closer to what I had posted in the other thread:
Type : Match : [Folders Only]
And
Size : Match : Is less than : 512 : KB
But honestly, I think the challenge you're going to have is how to apply the filter (which is tested and does work as intended to SELECT with the command: Select FILTER Exists) to what is DISPLAYED. Select is a one-time operation when you click the button that runs the command. You need the filter to be applied in your layout every time you change folders.
Unless I'm missing something simpler, this might be a job for a script of some kind... Hopefully there's some scripting interface that is more appropriate to use - but if nothing else, and you are still looking to tie this behavior to a LAYOUT, then perhaps we could write a script as an AfterFolderChange event handler which looks at the current lister layout name, and if it's your special layout name - every time you change folders the script could then apply the filter and then HIDE non-matching items (or some variation of that idea). Leaving you with just what you want to see....
Note that what gets hidden is just what matches the filter when you run the command. You'll need to re-run the command again if you want it to hide more things, and you'll need another command (or some more arguments, possibly), if you want to un-hide things that were previously hidden should the folder sizes change.
I guess that if I wanted a second click on that button to remove the filter you'd need a 'Select NOPATTERN SHOWHIDDEN' command in there but that'd be dependant on the system knowing that a selection was in place and need a bit of logic to run it? Mind you is it worth working that lot out when a refresh will kill the selection?
You might be able to set a variable or something to make a toggle button but I'm not sure how easy that would be. F5 or a separate button (or right-click action on the main button) is easier.
The advantage of the ...SHOWHIDDEN command over F5 is you won't lose current selections or cached column data.
works independently from the current selection (maintains it)
Since FILTERFLAGS=hide is used instead of HIDESEL, only those folders are affected, that really match the filter.
The variants posted before, would also hide currently selected folders that do not match the filter, just saying. o)
Forgot:
Make sure to adjust the filtername used ("Folders below 512KB") or rename your filter like that. The purpose of the AutoVars addin is to get rid of the "pressed" button, once the filtered view is reset by changing the folder (navigating up/down/away).