If you have used SQL Server 2000, you know that in SQL Server 2000, deleting previous backup files are easy. In the SQL Server 2000 , the Specify Backup Disk Directory you simple have to specify the period and the extension as shown in following figure.
Where is this option in SQL Server 2005? Well, this is FAQ in many forums and therefore, thought of writing this blog post.
In SQL Server 2005, if you drag and drop the Back Up Database Task, you will get the options to create backup file. However, there won’t be any place to enter remove backup option as in SQL Server 2000.
Because of this, many users are using scripting mechanisms to delete them. However, if you want to delete files inside subfolders, the script will become complex.
In the tool box of Maintenance Plan Tasks there is another task called Maintenance Cleanup Task which can be used to delete old backup as shown in following image.
After configuring this task, you need to connect the task to the backup task as shown in following image.