Does anybody have experience with the Dir command? I copied the example out of the manual and it doesn't work.

I am using WinNT 4.0 SP6. I copied the script straight out of the manual and checked it many times. The script is:
$FileName = Dir("C:\TEMP")
While $FileName <> "" and @ERROR = 0
? $FileName
Dir() ; retrieve next file
Loop

I am using the manual that came with Kixtart 3.62 that I downloaded from Steve Wilson's page.
The exact output I am getting is:
DirScript error : unknown command !.
Dir () ;retrieve next file

The first "Dir" is the output from "? $FileName". The "Script error : unknown command !." is in white and the "Dir () ;retrieve next file" is in red.


Thanks,
Bonk