I need a hand with a text file search project I'm working on. I want to be able to check text files for duplicate field ID numbers. The ID number will always come 1 line after the term "EditBox" or "CheckBox". EditBox and CheckBox will always be the only item on their lines. So for example:
My plan was to read a text file until I get to either EditBox of CheckBox, then read the next line (ID Number) and check to see if it is already in my Array, if so, I'll note that ID number as a duplicate, and continue to check for others. If it is not already in the Array, I'll add it, and again continue checking.
EditBox
1
EditBox
2
EditBox
2
EditBox
3
I tried to do this using the "LineRead" function off the WIKI, reading every line, checking if it was EditBox or CheckBox, and if so reading the next line. However this was very slow, as I'm sure this was not the best way to do this. Most of the files I want to search will have between 4000-8000 lines of text. I would like to be able to search of folder of 50-100 files in a few minutes or less.
I just tried using AfrowUK's FileSearch function, and that is able to search a 9000 line file in a second or two, and give me the number of times EditBox appears, so I think all this can be done, just need a hand modifying one of these function for my purpose. Any help would be much appreciated. Thanks all.
Jnuw