首页 > 代码库 > 本地vbs调试快速显示输出

本地vbs调试快速显示输出

function setClipBoard(str)    Set WshShell = CreateObject("WScript.Shell")    Set oExec = WshShell.Exec("clip")    Set oIn = oExec.stdIn    oIn.WriteLine str    oIn.Close    Do While oExec.Status = 0            WScript.Sleep 100    Loop    Set oIn = Nothing    Set oExec = Nothingend functiondim fso dim filesset fso = CreateObject("Scripting.FileSystemObject")set files = fso.getfolder("C:\Data").filesdim resultfor each file in files    if lcase(fso.GetExtensionName(file.path)) = "mdf" then        result = result & file.name & vbcrlf    end ifnextsetClipBoard(result)

 

存为*.vbs,双击即可。