[Pdx-pm] CGI access to remote windows server

Stout, Joel R Stout.Joel at Menloworldwide.com
Tue Aug 17 18:27:25 CDT 2004

The following script gives me this error:

"Cannot open directory (No such file or directory) f:\outbox\"

but it's there I swear :) Any help?  I double-checked the paths and they all lead me to the right folder... 


use CGI qw(param);
print "Content-type: text/html\n\n";

my $outdir;

#$outdir="c:\\perl\\test\\";         # works! but need to access files on another server
$outdir="f:\\outbox\\";              # mapped drive doesn't work - as suggested from googled post
#$outdir="\\\\ljkkk777\\Outbound\\"; # network path doesn't work, exact same path works with run command

opendir(OUTDIR, $outdir) || die print ("Cannot open directory ($!) $outdir");
my @files= readdir(OUTDIR);

print "<HTML>";
print "<BODY>";
print "<H1>Files</H1>";

my $file;

foreach $file (@files)
 print $file."<br/>"; 

print "</BODY>";
print "</HTML>";

More information about the Pdx-pm-list mailing list