#Include #Include #Include GUICreate('Recursive FileList', 800, 600, -1, -1) $label = GUICtrlCreateLabel('', 5, 10, 790, 30) $edit1 = GUICtrlCreateEdit('', 5, 45, 790, 540) GUISetState() Global $Files = '', $count Global $fpath = 'C:\Programme\AutoIt3\' GUICtrlSetData($label, $fpath) $start = TimerInit() _FileListToString($fpath) $diff = TimerDiff($start) GUICtrlSetData($edit1, StringReplace($Files, '|', @CRLF)) GUICtrlSetData($label, Round($diff/1000, 3) & ' sek. / ' & $count & ' Dateien') Global $aFileList = StringSplit($Files, '|'); Array $aFileList enthält Auflistung aller Dateien inkl. Pfad ;_ArrayDisplay($aFileList) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _FileListToString($path) Local $hSearch, $sFile $hSearch = FileFindFirstFile($path & '*.*') If $hSearch <> -1 Then While 1 $sFile = FileFindNextFile($hSearch) If @error Then SetError(0) ExitLoop EndIf If StringInStr(FileGetAttrib($path & $sFile), "D") <> 0 Then ContinueLoop $count += 1 $Files &= $path & $sFile & '|' WEnd FileClose($hSearch) EndIf _ReFileListToString($path) EndFunc Func _ReFileListToString($path) GUICtrlSetData($label, ' ' & $path) Local $dFileList = _FileListToArray($path, '*', 2) If IsArray($dFileList) Then For $i = 1 To $dFileList[0] Local $hSearch, $sFile $hSearch = FileFindFirstFile($path & $dFileList[$i] & "\" & '*.*') If $hSearch <> -1 Then While 1 $sFile = FileFindNextFile($hSearch) If @error Then SetError(0) ExitLoop EndIf If StringInStr(FileGetAttrib($path & $dFileList[$i] & "\" & $sFile), "D") <> 0 Then ContinueLoop $count += 1 $Files &= $path & $dFileList[$i] & "\" & $sFile & '|' WEnd FileClose($hSearch) EndIf _ReFileListToString($path & $dFileList[$i] & '\') Next EndIf EndFunc