导航:首页 > 净水问答 > bat过滤

bat过滤

发布时间:2023-12-21 04:09:56

⑴ 关于bat批处理过滤文件字符的问题

你可以把234.txt的内容粘贴出来
你这样弄一张图片怎么编辑呐?
观察了一下
发现你要的这个回红色标记是以答空格作为分割符
取的第八列
并且带有数字
for /f "tokens=8* delims= " %%a in ('type 234.txt') do echo %%a|findstr [0-9]

⑵ 请问怎样的文本过滤如何写VBS或者BAT代码

Set FSO = CreateObject("Scripting.FileSystemObject")
set f=fso.opentextfile("a.txt",1)
Dim MyArray()
i=0
Do Until f.AtEndOfStream
ReDim Preserve MyArray(i)
MyArray(i)=f.readline
i=i+1
loop
f.close
length = UBound(MyArray)
i=0
while i<length
w=instr(MyArray(i),"@")
if w<>0 then
y=mid(MyArray(i),1,w-1)
j=i+1
while j<=length
w=instr(MyArray(j),"@")
if w<>0 then
y1=mid(MyArray(j),1,w-1)
if y=y1 then
MyArray(j)="*"
end if
end if
j=j+1
wend
end if
i=i+1
wend
Dim NewArray()
j=0
i=0
while i<=length
if MyArray(i)<>"*" then
reDim Preserve NewArray(j)
NewArray(j)=MyArray(i)
j=j+1
end if
i=i+1
wend
set f=fso.opentextfile("a1.txt",2,true)
length = UBound(NewArray)
i=0
while i<=length
f.writeline NewArray(i)
i=i+1
wend
f.close
msgbox "OK"

说明:程序编的有些拙劣,不过可以实现你的操作
程序中“@”为英文模式
结果生成“.txt”文件
VBS代码

阅读全文

与bat过滤相关的资料

热点内容
污水处理厂温度高 浏览:589
污水处理生化池为什么晚上比较臭 浏览:858
半透膜生活 浏览:508
如何选择前置净水器扳手 浏览:145
废水管道是什么材料 浏览:514
超滤膜原理图解 浏览:486
污水废气的处理 浏览:175
平谷污水清运怎么样 浏览:600
ro膜加离子交换 浏览:672
超纯水去离子水是什么水 浏览:618
污水厂排污口论证的含义 浏览:507
美的饮水机过滤器 浏览:24
如图所示精馏塔由一只蒸馏釜 浏览:576
汽车零部件清洗废水 浏览:465
硫酸钙晶须在树脂砂轮应用 浏览:911
安装了油烟净化器为什么不用呢 浏览:214
茶吧机立式饮水机怎么没有电 浏览:229
高效陶瓷膜过滤器型号 浏览:859
超纯水是什么品种 浏览:693
回武汉用高铁可以 浏览:392