You may use the following Microsoft Windows PowerShell script to delete files in a directory that are X days old (I found the script here: http://elderec.org/2012/02/scripting-delete-files-and-folders-older-than-x-days/).

===START===

# set folder path
$dump_path = “C:\shares\dump”

# set min age of files
$max_days = “-7”

# get the current date
$curr_date = Get-Date

# determine how far back we go based on current date
$del_date = $curr_date.AddDays($max_days)

# delete the files
Get-ChildItem $dump_path -Recurse | Where-Object { $_.LastWriteTime -lt $del_date } | Remove-Item

===END===

In order to customize the script substitute the variables (i.e. $dump_path = “C:\shares\dump”) for your environment. As always, be sure to test scripts in a lab environment that mirrors your production environment as closely as possible.

Enjoy!