Here's a new tool; create an item in MD called LEVELS as
follows, and then for any file you can sort/select based on how many
punctuation-delimited fields the item id has.
Null string item ids have LEVELS of zero,
but "tom" and "dick.harry" have LEVELS of one and two respectively.
This was only tried on D3/Linux. It is free software, but it may be broken.
Use it at your own risk.
When I omitted the s;*;* output conversion, the List processor seemed to
omit processing the correlative altogether, so
LEVELS showed null string instead of the desired 0. So leave 007 as-is.
I'd wanted something a bit more selective, but there doesn't seem to be a
processing code to change all "*" to "3", so sadly every character BUT
letters and digits seem to act as field separators. Which is close enough
for my purposes, I guess.
001 S
002 0
003 L
004
005
006
007 s;*;*
008 aif 0 = '' then '0' else 0(mc/an)(L0) + '1'
009 r
010 1
011
012
013
014
015
016
017 Dcount of fields in item id. LIST MYFILE "tom*dick.harry" LEVELS says 3