PDA

Click to See Complete Forum and Search --> : Server.CreateObject("MSWC.Tools") - HELP!


Xenonic_Rob
Aug 17th, 2000, 12:27 PM
Hey guys, Xenonic Rob here.
I want a way to check whether a file exists on a server.
I know this command

Set Tools=Server.CreateObject("MSWC.Tools")

And then you can do something like

If Tools.FileExists("<thefile>") = true then blah,blah

But that doesn't work with IIS and PWS. Any ideas?
Thanks a lot.

dvst8
Aug 17th, 2000, 12:32 PM
why don't you use the FileSystemObject?


Set filesys = CreateObject("Scripting.FileSystemObject")

if filesys.FileExists("c:\temp\log.txt") then
Response.Write "yup it exists"
else
Response.Write "does not exist"
end if


this will most definitely work on IIS.

dvst8