Using variables in batch & VBS hybrids

被刻印的时光 ゝ 提交于 2019-12-06 08:45:59

In vbscript the first argument is : wscript.Arguments(0)

the second argument is : wscript.Arguments(1)

So,you should write it like that : `

----- Begin wsf script --->
<job><script language="VBScript">
 set fso = CreateObject("Scripting.FileSystemObject")
 If NOT fso.FolderExists(wscript.Arguments(0)) Then
 fso.CreateFolder(wscript.Arguments(0))
 End If
 set objShell = CreateObject("Shell.Application")
 set FilesInZip = objShell.NameSpace(wscript.Arguments(1)).items
 objShell.NameSpace(wscript.Arguments(0)).CopyHere(FilesInZip)
 set fso = Nothing
 set objShell = Nothing
</script></job>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!