当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP IsRootFolder 属性
The IsRootFolder property returns true if the specified folder is the root folder and false if not.
ASP IsRootFolder属性的作用是:如果指定的目录是根目录(如:C:或D:),则返回True逻辑真;如果不是根目录文件夹,则返回False逻辑假。
FolderObject.IsRootFolder |
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:asptest") 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! |