• I was also going to mention FORFILES. I use it for a similar purpose: Deleting trace files older than X days. I schedule it through SQL Scheduled Jobs.

    [font="Courier New"]forfiles /p "i:\tracefiles" /s /m *.trc /c "cmd /c del @path" /d -45[/font]

    I think the syntax varies slightly depending on the version of Windows.