怎么用bat写了一个vbs文件,运行然后删除掉
echoSetfso=Wscript.CreateObject("Scripting.FileSystemObject")>>XML_tree.vbsechosetf=f...
echo Set fso=Wscript.CreateObject("Scripting.FileSystemObject")>>XML_tree.vbs
echo set f=fso.opentextfile("CHIP.XML")>>XML_tree.vbs
echo s=replace(f.readall,"><", ">"^&chr(10)^&"<")>>XML_tree.vbs
echo f.close>>XML_tree.vbs
echo set r=fso.opentextfile("CHIP.XML",2,true)>>XML_tree.vbs
echo r.write s>>XML_tree.vbs
echo Wscript.quit>>XML_tree.vbs
start XML_tree.vbs
del XML_tree.vbs
我这样写然后,提示无法找到脚本文件
应该是还没运行就被删除了 哪位大神教教下要怎么写才好 展开
echo set f=fso.opentextfile("CHIP.XML")>>XML_tree.vbs
echo s=replace(f.readall,"><", ">"^&chr(10)^&"<")>>XML_tree.vbs
echo f.close>>XML_tree.vbs
echo set r=fso.opentextfile("CHIP.XML",2,true)>>XML_tree.vbs
echo r.write s>>XML_tree.vbs
echo Wscript.quit>>XML_tree.vbs
start XML_tree.vbs
del XML_tree.vbs
我这样写然后,提示无法找到脚本文件
应该是还没运行就被删除了 哪位大神教教下要怎么写才好 展开
2个回答
展开全部
@echo off
echo Set fso=Wscript.CreateObject("Scripting.FileSystemObject")>>XML_tree.vbs
echo set f=fso.opentextfile("CHIP.XML")>>XML_tree.vbs
echo s=replace(f.readall,"><", ">"^&chr(10)^&"<")>>XML_tree.vbs
echo f.close>>XML_tree.vbs
echo set r=fso.opentextfile("CHIP.XML",2,true)>>XML_tree.vbs
echo r.write s>>XML_tree.vbs
echo Wscript.quit>>XML_tree.vbs
start "" "XML_tree.vbs"
del XML_tree.vbs
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把start去掉!
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询