• homebrew01 (2/6/2014)


    I run this as a SQL scheduled job on my Windows 2003 server:

    [font="Courier New"]ForFiles /P D:\objectscripts /D -180 /C "CMD /C if @ISDIR==TRUE echo RD /Q /S @FILE &RD /Q /S @FILE"[/font]

    It deletes the folders in D:\objectscripts older than 180 days. Not sure about the syntax, I just found it the other day on someone's website. Test it first in a non critical area.

    Nice find.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events