• I use microsoft utility FORFILES to delete old files and schedule it through SQL agent. I think the syntax varies depending on your version of Windows.

    For me on Windows server 2003, this is one script I use to delete *.* files in a specific folder older than 180 days:

    forfiles /p "i:\objectscripts" /s /m *.* /c "cmd /c del @path" /d -180

    Quirk: The SQL job will show failed if there are no files to delete.