in reply to WinNT Opendir with CGI
Hmm, this does not work for me WITHOUT cgi either.
Looks like the problem is the "c:\$directory", I believe the single backslash is causing your problem. Try "c:/$directory" instead and you should be OK. (This made the script work for me)