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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scan Text file for Email addresses 1

Status
Not open for further replies.

puitar

Programmer
Apr 8, 2001
64
AU
Hello,

I have a database of newsletter subscribers (about 12000) and recently sent a newsletter out. I set up a pop3 account to catch all bounces and unsubscribe requests. Using Outlook XP I exported all these emails to a text file. I want to scan this text file for any emails addresses so I can remove them from my database.

I've tried using a tool called Web Data Extractor to scan this text file for email address but it only returns about 50 when I know there are at least 1000.

Is there any other way?

Thanks

 
Am sure there are other 3rd party programs that can do this but just for now:

It can be done using a batch file or a command line. For eg, if the name of the txt file is mails.txt located in c:\temp, you can type the following in a command prompt (note you need to type "type" as listed below):
type c:\temp\mails.txt | find "@"

You can also output all the info from the command above into another text file :

type c:\temp\mails.txt | find "@" > c:\temp\filter.txt

In the case above, filter.txt will have all the lines which have @ in them.



You could always use a tool like qgrep which you can download from the resource kit tools -
Once you install it, you can use qgrep to show you all lines which contain the @ symbol. So assuming your file is called mails.txt, the syntax will be qgrep @ mails.txt



Claudius (What certifications??)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top