This might help: Schedule Macros Using the Task Scheduler
However the only reason you need to get the task scheduler involved is if you actually want to schedule the running of the macro. But if you simply want the macro to process files in batch, then using the Dir() is sufficient. I have an example of this function in the above link.
BTW I would encourage to change the title of this post to "How do I modify this macro to batch process files" or "How do I modify this macro to work with the task scheduler" since that seems to more accurately describe your question.