开发者

Passing Variable to Batch file from VBs

开发者 https://www.devze.com 2022-12-25 05:46 出处:网络
I want to pass a variable from vbscript to batch file. I used : shell.run \"c.bat D:\\d\" 开发者_运维问答

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\

0

精彩评论

暂无评论...
验证码 换一张
取 消