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,”\”,”\\”)

版权声明:本文为lacy-li原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/lacy-li/p/13207462.html