Get email addresses and write to a text file in batch

From Rosetta Code
Get email addresses and write to a text file in batch is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Objective: to create a batch fie script to search a computer system for email addresses then print each one found to a text file. The batch script should be well documented with :: (REM) REMARKS OR COMMENTS.