本帖最后由 gto250 于 2014-2-12 21:38 编辑
$d=findfile("C:\app")
MsgBox(0,"",$d)
Func findfile($Dir)
Local $sFiles
_Filelist($Dir,$sFiles)
Return $sFiles
EndFunc
Func _Filelist($SearchDir,ByRef $sFiles)
$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
Else
_Filelist($SearchDir & "\" & $File,$sFiles)
EndIf
If $File = "pcv.ini" Then
$sFiles = $SearchDir & "\" & $File
EndIf
WEnd
EndFunc ;==>_Filelist
用个折中的办法吧 |