Sub FindFolders (path, node) 'Finds all folders in a specific path
WaitCursor(true)
al1.clear
DirSearch(al1,path)
c = StrLength(path)
For I =0 To al1.count - 1
s=al1.item(i)
If ControlType(node) = "TreeView.Node" Then
Control(node, node).addnewnode (SubString(s,c,StrLength(s)-c))
Else
Control(node, treeview).addnewnode (SubString(s,c,StrLength(s)-c))
End If
Next
al1.Clear
FileSearch(al1,path)
For I =0 To al1.count - 1
s=al1.item(i)
If ControlType(node) = "TreeView.Node" Then
node2.Value = Control(node,node).addnewnode (SubString(s,c,StrLength(s)-c))
Else
node2.Value = Control(node,treeview).addnewnode (SubString(s,c,StrLength(s)-c))
End If
node2.ImageIndex = 2
node2.SelectedImageIndex = 2
Next
If ControlType(node) = "TreeView.Node" Then
Control(node,node).expandall
Else
Control(node,treeview).expandall
End If
WaitCursor(false)
End Sub