DeleteFiles




Private Sub DeleteFilesinDirectory()
Dim t%

If File1.ListCount - 1 = 0 Then Exit Sub
list1.Clear
For t% = 0 To File1.ListCount - 1
File1.ListIndex = t%
File1.Selected(t%) = True
list1.AddItem File1
Next t%

Dim antwoord
antwoord = MsgBox("Are you sure about this?", 36)
If antwoord <> 6 Then Exit Sub

For t% = list1.ListCount - 1 To 0 Step -1
list1.ListIndex = t%
list1.Selected(t%) = True
Kill Dir1 & "\" & list1
Next t%

End Sub

Private Sub Dir1_Change()
File1 = Dir1.Path
Call DeleteFilesinDirectory
End Sub

Private Sub Drive1_Change()
Dir1 = Drive1

End Sub











( deletefiles.html )- by Paolo Puglisi - Modifica del 17/12/2023