Automating Email Archiving

I’m trying to figure out how to automate the email archiving option within DTOP and Apple mail. I’d like to have something that continuously runs in the background so I don’t have to manually go into DTOP, select FILE > IMPORT > and import my email messages.

Any ideas?