0
我有一個文件夾在女巫.pcl和.ps文件被寫入。vbsscript用參數運行cmd命令
我要打印這些文件,唯一possibillity這樣做,如果發現是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以cmd命令行?
[字符串拼接](https://msdn.microsoft.com/en-us/庫/ sx97884w(v = vs.84)的.aspx)? – Lankymart
謝謝你的工作! –