找回密码
 加入
搜索
查看: 1400|回复: 3

关于 文件搜索

[复制链接]
发表于 2009-1-24 11:29:32 | 显示全部楼层 |阅读模式
假如我在C:\windows (@windowsdir)里面搜索很多 Dll 和 EXE 文件(这些文件是指定文件的,非*.dll & *.exe)

搜索了,然后将他们复制到某个文件夹进行修改.

这个脚本该怎样写呢??

[ 本帖最后由 as86455011 于 2009-1-24 12:03 编辑 ]
发表于 2009-1-24 11:43:36 | 显示全部楼层
[au3]Func Search($current, $ext)
        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 $file=你要找的文件 Then
                                复制到别的地方
                                                                修改
                        EndIf
                EndIf
                If StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "."  Or $file <> "..") Then
                        Search($current & "\" & $file, $ext)
                                EndIf
        WEnd
        Return
EndFunc   ;==>Search[/au3]
 楼主| 发表于 2009-1-24 12:04:18 | 显示全部楼层
谢谢楼上的那位兄弟~
发表于 2012-5-17 19:33:11 | 显示全部楼层
很强大   暴力
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-30 11:33 , Processed in 0.072586 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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