#include <Constants.au3>
Opt("MustDeclareVars",1)
Dim $Drive, $File
$Drive = InputBox("输入", "请输入驱动器字符!(如:C)", "", "", 180, 80,-1, -1)
If @error Then Exit
$File = InputBox("输入", "请输入你要检测的文件名称!", "", "", 180, 80,-1, -1)
If @error Then Exit
_GetFileName()
Func _GetFileName()
Local $foo,$line,$lines
$foo = Run(@ComSpec & " /c dir /b /s /a " & $File, $Drive & ":\", @SW_HIDE, $STDOUT_CHILD)
$lines = ""
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
$lines &= $line
Wend
MsgBox(0,"test",$lines)
EndFunc
|