Open In App

ASP FolderExists Method

Last Updated : 23 Feb, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

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

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads