从VB传递变量到批处理文件

时间:2010-03-30 09:15:06

标签: vbscript

我想将一个变量从vbscript传递到批处理文件 我用过:

shell.run "c.bat D:\d" 

c.bat收到了%1

xcopy %1 D:\o\ /E

这很好用,但实际上路径是由用户输入的。所以它保存在变量say x中。如何将此变量传递给批处理文件?

1 个答案:

答案 0 :(得分:0)

x = "c:\path\"
shell.run "c.bat " & x

这应该运行c.bat c:\path\