locked
Delete files based on how old they are and based on what folder they are in. RRS feed

  • Question

  • Hi Guys,

    Iv been trying to wrap my head around this for a while and could use some help... Here's what I want to do. 

    I have log files being dumped into a folder on the C drive and they are starting to take up a lot of space. 

    What I need to do is delete the old folders and all the files therein based on 2 rules:

    Rule 1 

    If folder begins with "Folder_1-temp" - Delete All Files once they are 3 days old

    Rule 2

    If folder begins with "Folder_2-temp" - Delete All Files with the exception of the First and Last Day of the Month, once they are greater than 6 months old

    Any help you could give would be most appreciated.

    Thanks 

    Martin

    Tuesday, January 9, 2018 11:57 AM

Answers

All replies