Dim Pt As String
Pt = App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\"
Dim g1 As String
g1 = txtGruppo1.Text
Dim g2 As String
g2 = txtGruppo2.Text
Dim g3 As String
g3 = txtGruppo3.Text
Dim g4 As String
g4 = txtGruppo4.Text
Dim g5 As String
'g5 = txtGruppo5.Text
Dim g6 As String
g6 = txtGruppo6.Text
Dim g7 As String
g7 = txtGruppo7.Text
Dim g8 As String
g8 = txtGruppo8.Text
Dim g9 As String
g9 = txtGruppo9.Text
Dim g10 As String
g10 = txtGruppo10.Text
Dim fso As FileSystemObject
Dim fld As Folder
Dim sflds As Folders
Dim sfld As Folder
Set fso = New FileSystemObject
Set fld = fso.GetFolder(Pt)
Set sflds = fld.SubFolders
For Each sfld In sflds
If g1 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g1
End If
If g2 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g2
End If
If g3 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g3
End If
If g5 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g5
End If
If g6 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g6
End If
If g7 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g7
End If
If g8 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g8
End If
If g9 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g9
End If
If g10 = "" Then
Label22.Caption = "..."
Else
fso.CreateFolder sfld & "\" & g10
End If
Next
Set sflds = Nothing
Set fld = Nothing
Set fso = Nothing