I have a program generating a report once every hour and the reports are saved to a shared folder. I have been trying to create a script that will only leave the ten most recent files, as of now I going at least once a day and delete the files manually. I've done some research, but have only found scripts that delete files after x amount of days or weeks, nothing for hours. Can anyone help me with this?

0 Comments   [ + ] Show Comments


  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment



you should be able to modify this by changing the "59" to 601 and then it will kill files older then 601 minutes.


Answered 12/06/2013 by: SMal.tmcc
Red Belt

  • Thanks. I'll give this a shot and let you know.
Please log in to comment
Answer this question or Comment on this question for clarity