Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comparing two input file

Status
Not open for further replies.

antonyb

MIS
Aug 23, 2002
35
MY
greetings,

I was new in vb, i have a few problem got to solve it.
i have 2 input file.

data1.txt
-----------------
AAB-12728 TRC:input file
AAB-12571 TRC:input file
AAB-12331 TRC:input file
----------------

data2.txt
-----------------
AAB-12571 TRC:input file
AAB-12221 TRC:input file
-----------------

if there is a same data occur in both input file,
how could i compare it and exclude the(AAB-12571 TRC:input file) from both input file
and then i wanting others data will be loaded in listbox except the exclude data.

thanks in advance

antony
 
The method here is to move the data from the two input files into to arrays that you can move through quick with code. Use two loops (outer loop for array data from File1 and an inner loop for the array data from File2) and look for common data. Put the data that is distinct(not common) into another array and when you are done with the looping. Load the listbox from the third array. John
 
I have a posting on thread222-287071. Take a look at it and see if gets you started. If you have any questions let me know. [spin] If you choose to battle wits with the witless be prepared to lose.
[machinegun][hammer]

[cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top