本帖最后由 ipmitool 于 2017-6-26 07:57 编辑 #include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
Local $path = @ScriptDir
FindAllFile($path)
Func FindAllFile($sDir)
Local $hSearch = FileFindFirstFile($sDir & "\*.*")
; 检查搜索是否成功
If $hSearch = -1 Then Return
While 1
Local $sFile = FileFindNextFile($hSearch)
If @error Then ExitLoop
If @extended Then
FindAllFile($sDir & "" & $sFile)
;if $sFile=StringRight(".log",3) Then
ContinueLoop
EndIf
$open=FileOpen("1.txt",9)
;带目录
FileWrite($open,$sDir & "" & $sFile & @crlf)
;文件名
;FileWrite($open,$sFile & @crlf)
FileClose($open)
WEnd
; 关闭搜索句柄
FileClose($hSearch)
EndFunc
|