诚心请教,关于搜索排除问题,及列表问题。
使用如下脚本搜索 *.AVI 文件后,如何排除掉小于200M的文件呢?以及如何将搜索列表的所有文件的完整路径指定为控件GUICtrlSetData 的值呢
_Find("e:\", ".avi", 1, $GET)
Func _Find($path, $type, $flag, ByRef $result)
$FileList = _FileListToArray($path)
If Not @error Then
For $i = 1 To $FileList Step 1
If StringRight($FileList[$i], 4) = $type Then
_ArrayAdd($result, $path & "\" & $FileList[$i])
$result = UBound($result) - 1
Else
If $flag == 1 Then
_Find($path & "\" & $FileList[$i], $type, $flag, $result)
EndIf
EndIf
Next
EndIf
EndFunc 本帖最后由 netegg 于 2012-11-1 01:52 编辑
Func _Seachfile($current, $ext, $iSize)
Local $search = FileFindFirstFile($current & "\*.*")
While 1
Dim $file = FileFindNextFile($search)
If @error Or StringLen($file) < 1 Then ExitLoop
If Not StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "." Or $file <> "..") Then
If StringRight($current & "\" & $file, StringLen($ext)) = $ext Then
If Not (FileGetSize($current & "\" & $file) < $iSize) Then
ConsoleWrite($current & "\" & $file & @cr)
EndIf
EndIf
EndIf
If StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "." Or $file <> "..") Then
_Seachfile($current & "\" & $file, $ext, $iSize)
EndIf
WEnd
EndFunc ;==>_Seachfile
页:
[1]