#Include <File.au3>
#include <Array.au3>
Func _FindFilesName($sRoot, $sFile,byref $sp)
dim $ss
dim $i
;Проверка на слэш
if StringRight($sRoot,1) = "\" Then
$sRoot = StringLeft($sRoot,StringLen($sRoot)-1)
EndIf
$ss = ""
_FindFiles($sRoot, $sFile,$ss)
$sp1 = StringSplit($ss, @TAB)
if $sp1[0]>0 then
redim $sp[$sp1[0]-1]
for $i=1 to $sp1[0]-2
$sp[$i] = $sp1[$i+1]
Next
$sp[0] = $sp1[0]-2
Else
$sp[0] = 0
EndIf
EndFunc
Func _FindFiles($sRoot, $sFile, byref $ss)
Local $FileList
$FileList = _FileListToArray($sRoot, $sFile, 1)
If Not @error Then
For $i = 1 To $FileList[0]
;ConsoleWrite($sRoot & '\' & $FileList[$i] & @CR)
$ss = $ss &$sRoot & '\' & $FileList[$i]& @TAB
Next
EndIf
$FileList = _FileListToArray($sRoot, '*', 2)
If Not @error Then
For $i = 1 To $FileList[0]
_FindFiles($sRoot & '\' & $FileList[$i], $sFile,$ss)
Next
Else
EndIf
EndFunc