Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP FolderExists Method

ASP FolderExists Method


FileSystemObject Reference Complete FileSystemObject object reference manual


The FolderExists method returns a Boolean value indicating whether the specified folder exists. It returns True if it exists, otherwise False.

Syntax

FileSystemObject.FolderExists(foldername)

Parameters Description
foldername Required. The name of the folder to check for existence.

Example

<%

dim fs

set fs=Server.CreateObject("Scripting.FileSystemObject")

if fs.FolderExists("c:\asp")=true then

  response.write("Folder c:\asp exists!")

else

  response.write("Folder c:\asp does not exist!")

end if

set fs=nothing

%>


FileSystemObject Reference Complete FileSystemObject object reference manual