the previous post has come of the info needed, but doesn't specify the COM object used to get it.

this will enum a dir using COM:
$obj = createobject("Scripting.FileSystemObject")
$objdoc = $obj.getfolder("$filedir")

$d= $objdoc.Files
for each $file in $d
? $file.name+" "+ $file.type
next

$obj.quit
_________________________
How to ask questions the smart way <-----------> Before you ask