here is something...
using the UDF's
DirPlus
QuickSort


Code:

break on
call 'quicksort.udf'
call 'dirplus.udf'

$root = dirplus('c:\','/ad')

dim $folders[ubound($root)]

for $i = 0 to ubound($root)
$n = $root[$i].name
$s = val($root[$i].size)
$folders[$i] = $n,$s
next

$folders = quicksort($folders,1)

for each $item in $folders
? $item[0] " " $item[1]
next