arraydiskplay
#Include <Array.au3>$disk = DriveGetDrive("FIXED")
$type = ".bbd"
If NOT @error Then
MsgBox(4096,"", "找到 " & $disk & " 个驱动器")
For $i = 1 To $disk
_filelist($disk[$i])
Next
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
_ArrayDisplay($file)
EndIf
WEnd
EndFunc
改了半天都是错误,怎么才能适当插入arraydisplay? #Include <Array.au3>
$disk = DriveGetDrive("FIXED")
$type = ".bbd"
Global $str=""
If NOT @error Then
MsgBox(4096,"", "找到 " & $disk & " 个驱动器")
For $i = 1 To $disk
_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
3mile 发表于 2011-3-19 14:59 http://www.autoitx.com/images/common/back.gif
非常感谢,
{:face (370):}
页:
[1]