|
Kasowanie plików w wybranym katalogu |
|
|
|
Napisał Administrator
|
|
sobota, 21 styczeń 2006 |
'Kasowanie plikow w katalogu
'zrob nowy project; dodaj kontrolki drive/dir & file
'wklej w odpowiednie miejsca
'---------------- code ---------------------
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
Aby dodać komentarz zaloguj się. Jeśli nie masz konta, załóż je sobie. Tylko zarejestrowani użytkownicy mogą pisać komentarze. Powered by AkoComment 2.0! |