导航:首页 > 净水问答 > 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过滤相关的资料

热点内容
vue2内置过滤器 浏览:386
植物芳香油蒸馏设备 浏览:418
聚醚枫超滤膜进水pH 浏览:907
外置过滤桶推荐 浏览:676
75g反渗透 浏览:347
纯水机桶怎么装 浏览:524
车子怎么换空气滤芯 浏览:959
净化器排污怎么接 浏览:66
浴室镜子除垢 浏览:840
树脂胶抽料泵 浏览:383
海德能ro膜是哪国的 浏览:256
工业纯水处理设备怎么选 浏览:253
自己在家没酒曲怎么酿蒸馏酒 浏览:948
马桶上面的黄水垢尿垢怎么清理 浏览:405
大话2回血鬼用极品灵宝 浏览:584
甲醛释放量蒸馏萃取法 浏览:559
新柴490bpg怎么拆机油滤芯 浏览:837
纯水的汽点是多少 浏览:724
生活污水厂的污泥的有效管理 浏览:459
乐东污水处理公司 浏览:579