OK, so i've taken out the debug statements, and added back in the fso query, can anyone tell me why this isn't working?

Code:
break on
Dim $Directory $Directory = "\\nucnas02\intratst_content\busservices\procurement_home\pres\ProductGuide\"
Dim $f $f = CreateObject("Scripting.FileSystemObject")

If Exist ($Directory)
$Folder = Dir($Directory)

While $Folder <> "" and @ERROR = 0 and $f.IsFolder($Directory + $Folder)
If $Folder <> "." or $Folder <> ".."
$FileName = Dir($Directory + $Folder, 1) ; retrieve next file
While $FileName <> "" or $Filename <> "." or $FileName <> ".." and @error = 0
If $Filename <> "." or $Filename <> ".."
If Right($FileName, 4) = ".htm"
?$Filename + " is htm file"
EndIf

EndIf
$FileName = Dir("", 1)
Loop
EndIf
$Folder = Dir()
Loop
endIf