Confirm each item in one file is found in another
Posted: 21 Jul 2011 15:15
I have two files. First (goodlist.txt) is just a list of words, one per line, against which I wish to validate. Second (checkme.csv) is a CSV text file, with one "column" (e.g., the word between the 2nd and 3rd commas) containing a word I wish to ensure is found within the other file, the definitive list of allowable words.
If the csv file is OK, do one thing (nothing, or a message, or move the csv to a GoodFiles folder). If any line in the csv contains a word between the 2nd and 3rd commas that is not found in the reference file, do something else (a message, error file, beep, move csv to BadFiles folder...) that indicates the line number on which the erroneous code word was found, and the erroneous code word itself.
I'm hoping I don't have to pull out the big guns and move up to VB or such. Thanks for any help!
If the csv file is OK, do one thing (nothing, or a message, or move the csv to a GoodFiles folder). If any line in the csv contains a word between the 2nd and 3rd commas that is not found in the reference file, do something else (a message, error file, beep, move csv to BadFiles folder...) that indicates the line number on which the erroneous code word was found, and the erroneous code word itself.
I'm hoping I don't have to pull out the big guns and move up to VB or such. Thanks for any help!