如可做到发现到有PDF文件后打开文件夹,没有PDF文件一直执行
Set fso = CreateObject("Scripting.FileSystemObject")set f = fso.GetFolder("C:\Users\Administrator\Desktop\out\")
flag = false
for each item in f.files
if lcase(right(item.name,4)) = ".pdf" then
flag = true
exit for
end if
next
if flag then
createobject("wscript.shell").run "cmd /c start C:\Users\%username%\Desktop\out",2
end if
set f = nothing
set fso = nothing