我有一部分剧本
strRel = "\Program Files (x86)\Symantec\Symantec Endpoint Protection\12.1.4100.4126.105\Bin64\"
strArray = Split(strRel,"\",-1,1)
strCom = strArray(1)
wscript.echo "strCom is " & strCom将输出的
strCom is Program Files (x86) 如何修改拆分函数以使其输出
strCom is \Symantec\Symantec Endpoint Protection\12.1.4100.4126.105\Bin64\请注意脚本处理不同的目录,有不同的子文件夹.
发布于 2014-07-16 17:25:43
我会像在这个演示中一样使用子字符串VB脚本,除了Mid(strRel,21)
发布于 2014-07-16 18:10:13
您可以限制Split创建的字段的数量:
strRel = "\Program Files (x86)\Symantec\Symantec Endpoint Protection\12.1.4100.4126.105\Bin64\"
strArray = Split(strRel, "\", 3)
strCom = "\" & strArray(2)
WScript.Echo "strCom is " & strComhttps://stackoverflow.com/questions/24786917
复制相似问题