vbs获取本地文件路径后不能直接使用

vb获取本地文件路径后不能直接使用要将"\"替换为"\\"

Dim wShell ,oExec ,File_Selected
Set wShell = CreateObject("WScript.Shell")
Set oExec = wShell.Exec("mshta.exe ""about:<input type=file id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""")
‘文件路径
File_Selected = oExec.StdOut.ReadLine

dim rpath

'要将“\”替换为"\\"

rpath=Replace(File_Selected,"\","\\")

posted @ 2020-06-29 13:11  奔跑de大蜗牛  阅读(203)  评论(0)    收藏  举报