Vbscript 用vb脚本解析批处理文件中的参数
我有一个代码,通过它我可以解析batchscript的地址,它工作正常,但问题是如果我的路径类似于Vbscript 用vb脚本解析批处理文件中的参数,vbscript,batch-file,Vbscript,Batch File,我有一个代码,通过它我可以解析batchscript的地址,它工作正常,但问题是如果我的路径类似于C:\Documents and Settings\himanshu.jain\Desktop\example,那么.bat文件只能读取C:\Documents,有人能告诉我应该是什么问题吗。这是我的密码 Vb脚本代码 variable1="C:\Documents and Settings\himanshu.jain\Desktop\example" objWshell.run "batchfil
C:\Documents and Settings\himanshu.jain\Desktop\example
,那么.bat文件只能读取C:\Documents
,有人能告诉我应该是什么问题吗。这是我的密码
Vb脚本代码
variable1="C:\Documents and Settings\himanshu.jain\Desktop\example"
objWshell.run "batchfile.bat "& variable1
set SOURCE=%1
批处理脚本代码
variable1="C:\Documents and Settings\himanshu.jain\Desktop\example"
objWshell.run "batchfile.bat "& variable1
set SOURCE=%1
使用文字引号
variable1="""C:\Documents and Settings\himanshu.jain\Desktop\example"""
双引号转换为文字双引号