Version: 2.0
Allows us to check if a specified folder exists. Returns True if the folder does exist and False if it doesn't.
Note that if the folder that you are checking for isn't a subfolder of the current folder, you must supply the complete path.
<%
dim filesys, newfolder
set filesys=CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists("c:\DevGuru\website\") Then
newfolder = filesys.CreateFolder ("c:\DevGuru\website\")
Response.Write ("A new folder '" newfolder "' has been created")
End If
%>
"A new folder 'c:\DevGuru\website\' has been
created."
In this example the FolderExists method is used before creating a new folder to check that it doesn't already exist.