ublic Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim s As String
For Each s In System.IO.Directory.GetFiles("C:\Users\Admin\Desktop\Test2\")
System.IO.File.Delete(s)
Next s
For Each s In System.IO.Directory.GetDirectories("C:\Users\Admin\Desktop\Test2\")
System.IO.Directory.Delete(s)
Next s
End Sub
End Class
|