SPUG:-e filecheck on windows web app

John Subaykan cansubaykan at hotmail.com
Wed May 21 18:04:57 CDT 2003


I have copies of the same CGI script on two machines on my network.  This 
script, somewhere along the line, checks the existence of a file or 
directory on a third machine on the same network:

if (-e "//Machine3/path/to/file)

when this script is runs on //Machine1, (as it has been running until now) 
the file is found, and the test evaluates to true.

on //Machine2 (where this CGI will now reside), this test finds no such 
file.

the pathname is hard-coded as a UNC path, but other tests in the same script 
(or one of its modules) test filenames stored in variables:

if (-e $myFile)

these all fail on //Machine2

But when I run a simple command line test on //Machine2 like this:

if (-e "//Machine3/bla/bla) {
  print "it exists";
} else {
  print "no it doesn't";
}


... from the command line, this script tells me that the file exists.  A web 
app running on the same machine tells me otherwise.

Has anyone run into this problem before?  (both //Machine1 and //Machine2 
are Windows 2000 running IIS 5)

Thanks,

John

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the spug-list mailing list