回复 3# 魔导 #Include <Array.au3>
Local $sPath = @ScriptDir & '\test'
Local $sFiles
_FileFindAll($sPath, $sFiles, '.jpg')
Local $aLine = StringRegExp($sFiles, '\V+', 3)
_ArrayDisplay($aLine, '')
Func _FileFindAll($sDir, ByRef $sOut, $sExt)
Local $hSearch = FileFindFirstFile($sDir & '\*.*')
If $hSearch = -1 Then Return
While 1
Local $sFile = FileFindNextFile($hSearch)
If @error Then ExitLoop
If @extended Then
_FileFindAll($sDir & '\' & $sFile, $sOut, $sExt)
ContinueLoop
EndIf
If StringRight($sFile, 4) = $sExt Then $sOut &= $sDir & '\' & $sFile & @CRLF
WEnd
FileClose($hSearch)
EndFunc ;==>_FileFindAll
|