Problem reading an NT directory 
Author Message
 Problem reading an NT directory

I have a script that reads a directory from drive that is mapped to an
NT 4.0 machine.  I'm running NT 3.51 and perl for win32 build 107.

If I run the script from the command line it works just fine. But if I
execute it as a cgi-bin script it tells me "No such file or directory".

Here is the code:

print "Content-type: text/html\n\n";
print "<html>\n";

$file = "s:\\users\\rowland";

# seed the grab engine
$dirs[$#dirs+1] = $file;
# now let the engine recursively get the files
while($#dirs != -1) {


print "</html>\n";

sub GrabFiles {

  print "$dir<br>\n";  
  if (!opendir(D, $dir)) {
    print "Error is $!<br>\n";

  closedir D;

    print "$dir/$e<br>\n";
    next if $e =~ /^\./;
    if (-d "$dir/$e") {
      $dirs[$#dirs+1] = "$dir/$e";


Mon, 05 Jul 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Reading a NT directory from Unix

2. problems with reading a file from a directory

3. Problem to read DOS directory from SCO UNIX

4. Reading directories, entering directories, chaning file permissions...

5. Problem with perl changing context of directory on NT

6. working directory problem on NT

7. Unpack problems reading C-structs from snmpCollect file created by Openview for Windows NT

8. perl acting up on NT, problem with reading * as an argument

9. Problem with Perl read on NT

10. nt perl file read/write problem - aa.gif (0/1)

11. nt perl file read/write problem - aa.gif (1/1)

12. Problem reading a telnet connection with sysread/read


Powered by phpBB® Forum Software