• I need to be able to schedule a job in SQL Server to delete files in a directory that are two weeks or more old. Erase and delete don't seem to have a means for deleting based on date and time. I know I could use For in a batch script but I couldn't find a way to test for the file's date and time that way. I could just write a vb script, but then I get nervous bringing down the server if the script has an unforeseen issue.

    The results from the procedure will get me a table basically that I can select from by date, name, or whatever. Unless there's a better way, I know this is a bit overkill.

    Tony