Script to delete files contain certain strings and older than X days

Answered Script to delete files contain certain strings and older than X days

  • Thursday, January 17, 2013 6:50 AM
     
     

    Hi,

    I would like to script to put in our server (Windows Server 2008 R2 64bit) to delete log files that contain word "datastore" and older than 2 weeks.

    Anyone could advise me what is the best way to do this?

    Any batch file or powershell script that i can use for this?

    Thanks.

    Irfan

All Replies