ASP FolderExistsMethod


FileSystemObject 对象参考手册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 it returns False.

Syntax

FileSystemObject.FolderExists(foldername)

Parameters Description
foldername Required. The name of the folder whose existence is to be checked.

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 对象参考手册Complete FileSystemObject Object Reference Manual Other Extensions