|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Feb 2007
Messaggi: 12
|
[vb.net 2010] creazione cartelle
salve a tutti ho il seguente problema:
ho un treeview popolato con massimo 3 livelli. questo treeview non è ninent'altro che la struttura in cartelle che voglio creare ma sto trovando delle difficoltà assurde dato che la lettura del treeview è ricorsiva. data una path c:\ uso questo per leggere e in base al check creo quelle selezionate Codice:
Private sub Leggi()
Dim n As TreeNode
For Each n In Albero.Nodes
Stampa(n)
System.IO.Directory.CreateDirectory("C:\" & n.Text)
Next
End Sub
Private Sub Stampa(ByVal n As TreeNode)
If n.Checked = True Then
System.IO.Directory.CreateDirectory("C:\" & n.Text)
End If
Dim aNode As TreeNode
For Each aNode In n.Nodes
Stampa(aNode)
Next
End Sub
naturalmente mi crea cartelle tutte nella cartella root... ringrazio anticipatamente per eventuali risposte |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 11:04.



















