问题描述
大家好,
我正在桌面应用程序(vb.net)中处理文本文件.框架是3.0.
我有几个(例如10个)文本文件,每个文件包含10,000条记录.
例如
17725534 874893829834
17725535 313554132154
17725536 981521451554
等等.
我还有另一个文件,其中包含10个文件中的200条记录,称为Missing.txt.
例如
17725534 874893829834第1个文件的第1行.
27725537 564355432154第2个文件的第3行.
57725564 156548545484第5个文件的第30行.
直到200条记录.
现在我要检查10个文件以获得200条记录.
意思是,我将从Missing.txt中获取第一条记录,并在10个文本文件中循环查找相同的内容.
如果我在10个文件中找到任何记录,它将被删除或替换为零(0)(在同一文件中,不在Missing.txt中).
我无法删除记录或替换记录.
是否有ant IO功能来替换特定行或将其删除..?
Thanx ..
hi to all,
I am working with text files in desktop app(vb.net). Framework is 3.0.
I have a several(e.g. 10) text files each containing 10,000 records.
e.g.
17725534 874893829834
17725535 313554132154
17725536 981521451554
and so on.
I have another file containing 200 records called Missing.txt, from within 10 files.
e.g.
17725534 874893829834 1 st row from 1st file.
27725537 564355432154 3 rd row from 2st file.
57725564 156548545484 30 th row from 5st file.
so on till 200 records.
Now I want to check 10 files for 200 records.
Means, I will take 1 st record from Missing.txt & loop in 10 text files to find the same.
If I found any records in 10 files, either it''ll deleted or replaced with zeros(0)(In same file, not in Missing.txt).
I am not able to delete the record or replace the same.
Is there ant IO function to replace particular line or to delete it..?
Thanx..
推荐答案
这篇关于查找和从vb.net替换文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!