I want to pass a variable from vbscript to batch file.
I used :shell.run "c.bat D:\d" 开发者_运维问答
And c.bat received it as %1
i.e xcopy %1 D:\o\ /E
This works fine, but actually the path is to be entered by user. So it is saved in a variable say x. How do I pass this variable to the batch file?
x = "c:\path\"
shell.run "c.bat " & x
This should run c.bat c:\path\
精彩评论