X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

ASP FileExists Method


FileSystemObject Object Reference Complete FileSystemObject Object Reference

The FileExists method returns a Boolean value that indicates whether a specified file exists. It returns True if the file exists and False if not.

Syntax

FileSystemObject.FileExists(filename)

Parameter Description
filename Required. The name of the file to check if exist


Example

<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists("c:\asp\introduction.asp") then
  response.write("File c:\asp\introduction.asp exists!")
else
  response.write("File c:\asp\introduction.asp does not exist!")
end if
set fs=nothing
%>


FileSystemObject Object Reference Complete FileSystemObject Object Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook