简体   繁体   English

如何打开带有变量的 VBScript 文件?

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM