【发布时间】:2015-10-05 21:01:18
【问题描述】:
我有一个文件夹在 wwitch .pcl 和 .ps 文件中写入。
我希望打印这些文件,如果找到的话,唯一的可能是 cmd LPR 命令
脚本是:
set shApp = CreateObject("shell.application")
Set oShell = WScript.CreateObject ("WScript.Shell")
currentPath = "c:\printAll\"
set shFolder = shApp.NameSpace( currentPath )
set files = shFolder.Items()
for each files in files
if files.name <> "printAll" then
'msgbox("printing "&files.name)
oShell.run "cmd.exe /C LPR -S SRV00APP.N-IX.LOCAL -P HP400MFP #{shFolder}/#{files.name} "
end if
next
如何将属性作为 currentPath 或 files.name 传递给命令行命令?
【问题讨论】: