ASP FolderExists Method

Definition and Usage

The FolderExists method returns a boolean value indicating whether the specified folder exists. If it exists, it returns True, otherwise it returns False.

Syntax:

FileSystemObject.FolderExists(foldername)
parameter description
foldername is required. It needs to check the name of the folder that exists.

instance

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