How to delete all but the most recent files?
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?