When it comes to specific requests like this you get a programmer to write a script or app for your requirements. I've seen such requests before and yours is yet another variant on the repeating task question.

Figure about a week for your custom script or maybe an app.
Bob