Возвращающий True, если указанная папка является корневой; иначе возвращается False
object.IsRootFolder
Параметры
object - всегда объект Folder.
Пример
Следующий код иллюстрирует использование IsRootFolder свойства:
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Sub DisplayLevelDepth(pathspec)
Dim f, n
Set f = fs.GetFolder(pathspec)
If f.IsRootFolder Then
MsgBox "The specified folder is the root folder."
Else
Do Until f.IsRootFolder
Set f = f.ParentFolder
n = n + 1
Loop
MsgBox "The specified folder is nested " & n & " levels deep."
End If
End Sub