找回密码
 加入
搜索
查看: 1564|回复: 1

[系统综合] 诚心请教,关于搜索排除问题,及列表问题。

[复制链接]
发表于 2012-11-1 01:07:44 | 显示全部楼层 |阅读模式
使用如下脚本搜索 *.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[0] Step 1
                        If StringRight($FileList[$i], 4) = $type Then
                                _ArrayAdd($result, $path & "" & $FileList[$i])
                                $result[0] = UBound($result) - 1
                        Else
                                If $flag == 1 Then
                                        _Find($path & "" & $FileList[$i], $type, $flag, $result)
                                EndIf
                        EndIf
                Next
        EndIf
EndFunc
发表于 2012-11-1 01:49:50 | 显示全部楼层
本帖最后由 netegg 于 2012-11-1 01:52 编辑

[au3]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[/au3]
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 07:04 , Processed in 0.089219 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表