Confusion of roles here.
Better to centre the whole effort on a database; e.g. Rapidfile http://www.mwenterprises.co.uk/E/RapidFile/
Essential details of every new action, every incoming email requiring reply, are captured in the database, and appropriate templated text is output.
Needs a database template for each type of email you write, one for each perl/ruby/awk script; etc
A little script gets the output, massages it appropriately, names it, saves it, and opens the IDE.
Database records have as unique key a 5 digit number (00001, 00002 ...);
File names are Number_Mnemonic.extension e.g. 00001_Dupont.txt,
Replies get filed similarly
Files are assigned to directories in batches of 100.
First hundred go in directory ..\00000_00099, second in directory ..\00100_00199 und so wieter
Proof of concept - this has worked for me since the early 1990s. I now have more than 15500 entries. Colleagues routinely ask for stuff that they cant find in their system
Recent records easily found either by eyeballing dir list for a mnemonic, older ones by database boolean search. "Dupond NOT Dupont AND before 2003" returns the record number(s) of what you are looking for instantaneously.