I am getting the same results as well. But notice what is happening.

...
.temp.txt
.
the period is being written as the value of $filename
then the file temp.txt is coming after Dir()

that is whats boggling me. I want to get rid of "." and I just want the file name to be in the variable $filename.

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