我写了一个小脚本如下:
Dim CMD
Set WshShell = WScript.CreateObject("WScript.Shell")
CMD = Wscript.Arguments(0)
WshShell.Run CMD
现在我想调用这个脚本并传递一个参数,如下所示:
I:\VbScript.vbs \\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f="\\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT"
请问您能告诉我该怎么做,因为参数调用中的这个引号都会导致问题。
答案 0 :(得分:0)
双引号应有效:
I:\VbScript.vbs "\\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f="\\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT""
答案 1 :(得分:0)
cscript.exe I:\VbScript.vbs "\\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f=\\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT"
cscript.exe I:\ VbScript.vbs“\ svaaoffprg2 \ ODrive \ pros_groups \ GRMS \ GmLoad5.exe / f =”,“\ Svaakntnas537 \ BODI \ Data Files \ ACC \ PROS_LOAD \ G5 \ Staging \ VSGPNR120918.DAT “
试试这个对我有用。