|
发表于 2011-2-9 18:18:07
|
显示全部楼层
#include <File.au3>
_Filefind("E:\TEST");在AU3程序目录下执行的话,此处测试路径改为@ScriptDir应该是可以的。
MsgBox(0,0, 'done')
Func _Filefind($_Path)
$folder = _FileListToArray($_Path, "*", 2);找文件夹
If Not IsArray($folder) Then Return 0
For $i = 1 To $folder[0]
$newPath = $_Path & "\" & $folder[$i]
$file = _FileListToArray($newPath, "a.txt", 1);找满足条件的文件
If @error = 0 Then
MsgBox(0,0,$newPath)
ShellExecute($newPath&"\a.txt",0)
Else
_Filefind($newPath);当前目录下找不到再继续其它路径找
EndIf
Next
EndFunc ;==>_Filefind |
|