求一个批处理命令,要求实现TXT文本中的数字替换。 80
例如:aaaassssddddffff(10)aaaassssddddffff(10)sssseeeerrrrtttt(20)sssseeeerrrrtttt(20)pp...
例如:
aaaassssddddffff (10)
aaaassssddddffff (10)
sssseeeerrrrtttt (20)
sssseeeerrrrtttt (20)
ppppooooiiiiuuuu (30)
ppppooooiiiiuuuu (30)
将上面括号中的10,20,30分别替换成43,44,45 展开
aaaassssddddffff (10)
aaaassssddddffff (10)
sssseeeerrrrtttt (20)
sssseeeerrrrtttt (20)
ppppooooiiiiuuuu (30)
ppppooooiiiiuuuu (30)
将上面括号中的10,20,30分别替换成43,44,45 展开
2个回答
展开全部
set open=createobject("scripting.filesystemobject")
set cdopen=createobject("useraccounts.commondialog")
public function showopen(byval typeval,byval dirval)
cdopen.initialdir=dirval
cdopen.filter=typeval
cdopen.showopen
showopen=cdopen.filename
if showopen="" then exit function
end function
file=showopen("txt|*.txt",".")
if file="" then wscript.quit
f=split(file,"\")
read=open.opentextfile(file).readall
for i = 1 to 3
read=replace(read,i*10,42+i)
next
msgbox read
set cdopen=createobject("useraccounts.commondialog")
public function showopen(byval typeval,byval dirval)
cdopen.initialdir=dirval
cdopen.filter=typeval
cdopen.showopen
showopen=cdopen.filename
if showopen="" then exit function
end function
file=showopen("txt|*.txt",".")
if file="" then wscript.quit
f=split(file,"\")
read=open.opentextfile(file).readall
for i = 1 to 3
read=replace(read,i*10,42+i)
next
msgbox read
更多追问追答
追问
43,44,45不是循环数,是随机数,例如可以是43,87,29
追答
说具体一点?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询