This is whats happening.

$filename = Dir("c:\temp")
while $filename <> "" and @ERROR = 0
? $filename
Dir()
loop

$filename seems to be being set to the root of the directory, which is ".". Dir() is calling the next value in $filename but it is never being used. this is what I tried and it works.

$filename = Dir("c:\temp")
while $filename <> "" and @ERROR = 0
$host = Dir()
? $host
Dir()
loop

this outputs what I want. $filename seems to be acting as an array, but in the example it is never being incremented to the next value, except after dir().

thanks

_________________________
WonderBoy Constantly learning everyday, how much I dont know :-)