Running a Batch File
1. Save the file you just coded (or copy/paste mine in, it will run as written), and treat just like an exe file,
double-click.
double-click.
2. In order to run it on a scheduled time, you can create a task on Windows Task Scheduler program. You can set the time,date and condition for the task. Here's how it looks like:
3. As you can see this task will run at 9am on weekdays only when user is logged on.