#Include <Array.au3>
$disk = DriveGetDrive("FIXED")
$type = ".bbd"
Global $str=""
If NOT @error Then
MsgBox(4096,"", "找到 " & $disk[0] & " 个驱动器")
For $i = 1 To $disk[0]
_filelist($disk[$i])
Next
$temp=StringSplit($str,"|")
_arraydisplay($temp)
EndIf
Func _filelist($searchdir)
$search = FileFindFirstFile($searchdir & "\*")
If $search = -1 Then Return -1
While 1
$file = FileFindNextFile($search)
If @error Then
FileClose($search)
Return
ElseIf $file = "." Or $file = ".." Then
ContinueLoop
ElseIf StringInStr(FileGetAttrib($searchdir & "\" & $file), "D") Then
_filelist($searchdir & "\" & $file)
EndIf
If StringRight($file, 4) = $type Then
$str&=$searchdir & "\" & $file&"|"
EndIf
WEnd
EndFunc
|