能减少文件大小- Set objFSO = CreateObject("Scripting.FileSystemObject")
- strFolder = "./"
- Set objFolder = objFSO.GetFolder(strFolder)
- Set colFiles = objFolder.Files
-
- For Each strFile in colFiles
- If LCase(objFSO.GetExtensionName(strFile)) = "jpg" Then
- ' 在此处执行操作,例如打印文件名或打开文件等
- set wshell = wscript.createobject("wscript.shell")
- wshell.run("mspaint.exe "+strFile)
- WScript.Sleep 2000
- wshell.SendKeys "^{s}"
- WScript.Sleep 2000
- wshell.SendKeys "%{F4}"
- End If
- Next
复制代码
|