最新的Web開發教程
 

ASP IsRootFolder Property


<完整文件夾對象參考

如果指定的文件夾是根文件夾,如果不是假的IsRootFolder屬性返回true。

句法

FolderObject.IsRootFolder

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp\test")
if fo.IsRootFolder=true then
  Response.Write("The folder is the root folder!")
else
  Response.Write("The folder is not the root folder!")
end if
set fo=nothing
set fs=nothing
%>

Output:

The folder is not the root folder!

<完整文件夾對象參考