Automated quarantine export/delete

I should have searched the forum harder before asking. If anyone else lands on this post instead of one of the ones with an answer, I found this example useful: