Re: how to avoid duplicates WHILE writing...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Use the scripting.dictionary object and its "Exists()" method - if it exists then do not write it, if not then add the address to
the dictionary and write it out to the file.

--
Tim Williams
Palo Alto, CA


"Jason Simmons" <js@xxxxxx> wrote in message news:ens3iQC3GHA.3516@xxxxxxxxxxxxxxxxxxxxxxx
i have a big text file.
im reading the text file, looking for certain strings (email addresses), and
writing them to another file when i find them.

problem is there are a lot of duplicates. i cant figure out the logic as far
as how do i:

find an email address, write it IF it hasnt already been written.

i can think of some very inefficient ways to do this, but would love to see
a "good" way

thank you




.



Relevant Pages

  • Re: how to avoid duplicates WHILE writing...
    ... if you could somehow show me a small example i would really appreciate it ... i cant figure out the logic as ... write it IF it hasnt already been written. ... i can think of some very inefficient ways to do this, ...
    (microsoft.public.scripting.vbscript)
  • baldrick paid up?
    ... Cant find out from ... the court due to data protection issues. ... If he hasnt then I am making 2 furthur applcations, ...
    (uk.local.southwest)
  • Append Query
    ... I am new to access so this may be easy but I cant figure ... The imported data can sometimes contain duplicates and ... Can anyone give me any pointer into how this should be ... TIA ...
    (microsoft.public.access.queries)
  • Delphi 2005 & BDE
    ... Very impressed with delphi2005, cant see what all the fuss is about, yes it ... but it hasnt made me totally unproductive. ... Dallas Goldswain ...
    (borland.public.delphi.non-technical)
  • Re: Any Love For Elektra?
    ... I will get some pics up soon if the dumpster ... hasnt been emptied yet or pillaged by the neighborhood recycler. ... Still cant get the audio to work while uploading but its probably for ...
    (rec.games.pinball)