導航:首頁 > 凈水問答 > 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過濾相關的資料

熱點內容
大連edi 瀏覽:5
半透膜可以讓什麼自由通過 瀏覽:439
東營市墾利污水處理廠 瀏覽:84
陽離子交換量測量 瀏覽:240
精處理廢水池裡的淤泥如何處理 瀏覽:725
煤油煙凈化器的作用是什麼 瀏覽:662
抽濾與微孔過濾的區別 瀏覽:777
如何挑選汽車濾芯 瀏覽:900
仔豬拉痢喝污水什麼原因 瀏覽:372
凈水機ro膜 瀏覽:145
改性水性環氧樹脂 瀏覽:475
隆化共有幾個污水處理廠 瀏覽:938
鼎新純凈水怎麼樣 瀏覽:754
大孔樹脂比對 瀏覽:864
給水管和污水管道距離多少 瀏覽:199
適合圓形魚缸的過濾器 瀏覽:791
凈水器上長青苔是什麼原因 瀏覽:699
商場用凈水機哪個好 瀏覽:839
雨污水過路鋼套管有什麼作用 瀏覽:472
污水井反味的問題應該怎麼處理 瀏覽:130