First you will need the kix4.1 function DirPlus()

then your code will be like this.


$files = dirplus("h:\oshmans farewell",".gif;.pst;.doc;.vsd;.xls;.mpp;.mdb;.jpg",1,1)
for each $file in $files
select
case $file.type = "PST file"
$pst = $pst + $file.size
case $file.type = "Microsoft Excel Worksheet"
$xls = $xls + $file.size
case $file.type = "JPEG Image"
$jpg = $jpg+$file.size
;case ....
endselect
next

? "pst files total size = $pst"
? "Excel files total size = $xls"
? "JPG image file total size = $jpg"

exit(0)

Bryce