AW: Dateien suchen und löschen
23.01.2011 15:06:09
Josef
Hallo René,
Achtung! Es erfolgt keine Rückfrage, die Dateien sind entgültig weg!
Private Sub CommandButton1_Click()
Dim strPath As String, strFile As String
strPath = "E:\Forum"
strPath = IIf(Right(strPath, 1) = "\", strPath, strPath & "\")
strFile = Dir(strPath & "?W*", vbNormal)
Do While strFile <> ""
If strFile Like "AW*" Or strFile Like "RW*" Then
Kill strPath & strFile
End If
strFile = Dir
Loop
End Sub
Gruß Sepp