Цитата asdf8:
Этот скрипт осматривает папку WindowsDir в 6 раз быстрее, чем из предыдущего поста »
|
А так:
Код:
#include <Array.au3>
$begin1 = TimerInit()
$aReturn = _FileSearch(@WindowsDir, "*.ini")
$dif1 = TimerDiff($begin1)
_ArrayDisplay($aReturn, Round($dif1, 2))
Func _FileSearch($sPath, $sFileMask)
Local $iPID, $sStdOutRead, $aRet
$iPID = Run(@ComSpec & ' /C Dir "' & $sPath & '\' & $sFileMask & '" /S /B /A RASH', @SystemDir, @SW_HIDE, 6)
While 1
$sStdOutRead &= StdoutRead($iPID)
If @error <> 0 Then ExitLoop
WEnd
$aRet = StringSplit(StringStripCR(StringStripWS($sStdOutRead, 3)), @LF)
Return SetError(@error, 0, $aRet)
EndFunc
?