Link to home
Start Free TrialLog in
Avatar of arabiafish
arabiafish

asked on

jscript fileexists not working

I've tried every conceivable file, both absolute and relative paths, in the same folder and in the root directory, and it simply doesn't work. It always says not found. Any suggestions?

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

if(fs.FileExists("test.asp") == true)
{
      Response.Write("File exists.")
}
else
{
      Response.Write("File does not exist.")
}
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Is this client or server code?  I am assuming the file is on the server, right?
ASKER CERTIFIED SOLUTION
Avatar of kiddanger
kiddanger
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you arabiafish.  (O:=