Skip to content
Related Articles

Related Articles

Improve Article

ASP FolderExists Method

  • Last Updated : 23 Feb, 2021

The FolderExists Method in ASP is used for returning the Boolean value which indicates that whether a particular folder exists or not. It returns true means the particular folder exists or returns false if the particular folder not exists.  

Syntax:

FileSystemObject.FolderExists(foldername)

Parameter Value:

  • foldername: It specifies the name of the folder which would be checked if exists or not.

Example: Below code demonstrates the FolderExists Method. 

ASP




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

Output:

Folder d:\GFG exists
My Personal Notes arrow_drop_up
Recommended Articles
Page :