Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: FSO - Different Server - JScript


Message #1 by "Robert Turner" <rturner003@b...> on Tue, 22 Jan 2002 11:39:57
I am using the FileSystemObject to find out if a file exists.



On the server where IIS exists I have a d drive.



using Jscript:



var fso=new ActiveXObject("Scripting.FileSystemObject");

Response.write (fso.FileExists("d:\\rtt\\tmp.mdb")



This returns true



On a different server there is a file called bc.cnt which I can access. I 

mapped the server to a drive and used



Response.write (fso.FileExists("g:\\help\\bc.cnt")



This time it returns false. If I use my text editor and in the file open 

entere 'g:\help\bc.cnt' it opens the file.



I have tried various things in putting in server names etc but I have 

failed to return true. 



Has anyone any ideas



Robert T Turner

Message #2 by "phil griffiths" <pgtips@m...> on Wed, 23 Jan 2002 12:03:01
Sounds like a permissions issue.



This script is running in asp page on the server?  You allow anonymous 

access?  If so, have you checked that the anonymous user IUSR_... has 

access to the directory g:\help?



HTH

Phil

> I am using the FileSystemObject to find out if a file exists.

> 

> On the server where IIS exists I have a d drive.

> 

> using Jscript:

> 

> var fso=new ActiveXObject("Scripting.FileSystemObject");

> Response.write (fso.FileExists("d:\\rtt\\tmp.mdb")

> 

> This returns true

> 

> On a different server there is a file called bc.cnt which I can access. 

I 

> mapped the server to a drive and used

> 

> Response.write (fso.FileExists("g:\\help\\bc.cnt")

> 

> This time it returns false. If I use my text editor and in the file open 

> entere 'g:\help\bc.cnt' it opens the file.

> 

> I have tried various things in putting in server names etc but I have 

> failed to return true. 

> 

> Has anyone any ideas

> 

> Robert T Turner


  Return to Index