回复 3# t895073 #NoTrayIcon
Opt("MustDeclareVars", 1)
#include <Constants.au3>
Local $Drive, $I, $File
$File = InputBox("输入", "输入要查找的文件名:", "", "", 180, 80, -1, -1)
If @error Or $File = "" Then Exit
$Drive = "D:"
Local $foo, $line, $lines
$foo = Run(@ComSpec & " /c dir /b /s /a " & $File, $Drive & "", @SW_HIDE, $STDOUT_CHILD)
MsgBox(0,0,@ComSpec & " /c dir /b /s /a " & $File, $Drive & "")
$lines = ""
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
$lines &= $line
WEnd
If $lines = "" Then
MsgBox(16, "错误", "在驱动器" & $Drive & "没有找到要找的文件!", 2)
EndIf
MsgBox(0, "找到的文件:", $lines)
这个可以做到!
传送门 http://www.autoitx.com/forum.php ... B%F7%2B%CE%C4%BC%FE |