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 =
WScript.Sleep
Loop Set oIn = Nothing
Set oExec = Nothing
end function dim fso
dim files
set fso = CreateObject("Scripting.FileSystemObject")
set files = fso.getfolder("C:\Data").files dim result for each file in files
if lcase(fso.GetExtensionName(file.path)) = "mdf" then
result = result & file.name & vbcrlf
end if
next setClipBoard(result)
存为*.vbs,双击即可。