Instead of using an unformatted text file, you should use an INI formatted file. Then you would not have to loop through it, nor would you have duplicates.

I believe I posted my LUser Administrator password changer that uses this method.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.