you might want to check some of the dir udfs.
like dirscan: http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000303

with dirscan you would do:
code:
$basedir="c:\"
$nul=REDIRECTOUTPUT("c:\attributes.txt",0)

for each $file in DirScan($basedir,0,1)
? getfileattr($file)
chr(59)
next

so, this way you don't need to re-invent the wheel [Wink]
_________________________
!

download KiXnet