| Рекурсивный поиск фалов по маске |
|
Поместите на форме File1(FileListBox) и Dir1(DirListBox). 'КОД ФОРМЫ Public Sub ActionDIR(ByVal Path$) File1.Path = Path File1.Refresh For i = 0 To File1.ListCount - 1 List1.AddItem AddBackSlash(Path) & File1.List(i) Next Dir1.Path = Path Dir1.Refresh For i = 0 To Dir1.ListCount - 1 ActionDIR Dir1.List(i) Dir1.Path = Path Dir1.Refresh Next DoEvents End Sub Public Function AddBackSlash(ByVal S$) If Right(S, 1) <> "\" Then S = S + "\" AddBackSlash = S End Function Private Sub Form_Load() ''''''''''''''ПОКАЗЫВАЕМ ФОРМУ'''''''''' show Refresh DoEvents tim = Timer Do While (Timer - tim) < 1 DoEvents Loop ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' File1.Pattern = "*.wav" 'Устанавливаем поиск по маске *.wav For i = 1 To Drive1.ListCount - 2 ActionDIR Left(Drive1.List(i), 2) & "\" Next End Sub |