Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If FSO.FileExists( Server.MapPath( "filename.xyz" ) ) Then
... file exists ...
... it does not ...
The argument to the FileExists method must be the FULL PATH to a file somewhere on your local system (or LAN, if applicable). You can either give the path explicitly, as in
If FSO.FileExists( "x:\nastyComments\crossposts\answer3.txt" ) Then
or you can give a path that is relative to the location of the currently executing ASP page via something like
If FSO.FileExists( Server.MapPath( "../images/uglyface.jpg" ) ) Then
See other FAQs in the category for more on filenames, etc.