OK, I understand the meaning of $Counter, but I'm not sure where to put in in my script. I've tried serval places without any luck. Could you please tell me where to put int in ?


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

OPEN (1, "E:\Script\HomeSize @MDAYNO @MONTH @YEAR.txt",5)

$root = dirplus('$HomeDirsLocation','/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 $i = UBound($folders) To 0 Step -1
$item=$folders[$i]
$item[0]+" "+$item[1]+@CRLF
WRITELINE (1, $item[0] + " " + FormatNumber (CDbl($item[1]/1024/1024),0) + " MB" + @CRLF)
Next

**********