Quickly put a bunch of emails into one file
import os, re output_file = open('/path/to/output/file', 'a') email_pat = re.compile('^\d+\.$') [output_file.write(open(email).read().split('From: ')[1]) for email in os.listdir(os.getcwd()) if email_pat.match(email)]