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

热点内容
废水中的甲醛如何测量 浏览:807
换净水器的过滤器多少钱 浏览:331
超滤机里面矿物质是什么 浏览:717
污水指标有哪些如何检测 浏览:643
纯水电导度是什么意思 浏览:125
工业水处理杂质 浏览:800
中空纤维离心超滤 浏览:151
酚醛树脂浇注固化剂 浏览:348
杭州市污水管管内底标高 浏览:919
玻璃纸可以做半透膜吗 浏览:272
蒸馏水器玻璃 浏览:948
污水提升器缠绕头发 浏览:943
油烟净化器风阻大什么意思 浏览:179
水垢可以用来干嘛 浏览:809
3m环氧树脂地坪 浏览:119
污水厂磷超标的原因 浏览:667
除垢水会破坏铜吗 浏览:149
美国进口8寸电泳漆超滤膜批发商 浏览:878
超滤机废水率 浏览:167
易彤与夏普空气净化器怎么样 浏览:887