FolderItem.IsFolder
From Xojo Documentation
Read-Only Property (As Boolean )
True if the FolderItem is a folder/directory).
Example
Prompt the user to choose a folder and then display the number of files it contains:
Var f As FolderItem
f = FolderItem.ShowSelectFolderDialog
If f.IsFolder Then
MessageBox("The folder has " + f.Count.ToString + " files.")
Else
MessageBox("The folderitem is not a folder!")
End If
f = FolderItem.ShowSelectFolderDialog
If f.IsFolder Then
MessageBox("The folder has " + f.Count.ToString + " files.")
Else
MessageBox("The folderitem is not a folder!")
End If
This code checks for a specific folder on the drive: