[英]How to open a VBScript file with a variable?
I'm starting a VBScript sometimes from a Windows batch file:我有时从 Windows 批处理文件启动 VBScript:
FOR /F %%i IN (list.txt) DO vbscript.vbs
and I want to receive the %%i
variable in the VBScript.我想在 VBScript 中接收
%%i
变量。
Run the VBScript with %%i
as its argument:以
%%i
作为参数运行 VBScript:
FOR /F %%i IN (list.txt) DO vbscript.vbs %%i
and assign the argument to a variable inside the VBScript:并将参数分配给 VBScript 中的变量:
var = WScript.Arguments(0)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.