Friday, January 29, 2016

Remove Old Files - Schedule It

In previous part one and part two I described how to create and export rules from MSH Delete Files Older Than application. 

In this part it’s time for auto scheduling. 

Application doesn’t have built-in scheduler so we need to use the standard one from Microsoft Windows. Open Start Menu | All Programs | Accessories | System Tools | Task Scheduler application. Click right mouse button on Task Scheduler Library and select Create Basic Task

Set task name, something like: Remove old files from C.

Create a Basic Task - Task Scheduler

Click Next button, I would like to remove files weekly, so select Weekly option and click Next button. 

Application should remove files on each Monday at 00:00 starting from 1st of February.
Weekly Trigger - Task Scheduler

Go to the next page and leave Start a program option, on the next page click Browse button and select MSH Delete Files Older Than.exe application. In arguments field put -f c:\data\settings.xml parameter. 

Last page will show you a summary information about your settings. Click Finish button. 

Now everything is set up and your operating system will be responsible of running the application on defined time. So if you want to keep your files organized take a look and visit MSH Delete Files Older Than web site.