How do I delete all files in a directory older than 2 weeks.
We have a system that stores log files daily and I need to be able to delete files once they are more that a couple weeks old and leave the newer ones for reporting on. I have already written the code to do the reporting on the newer files but am not sure how to systematically go through all of the files and delete them based on their file date. I have already been pointed to the "FileTimeDate" function.
We have a system that stores log files daily and I need to be able to delete files once they are more that a couple weeks old and leave the newer ones for reporting on. I have already written the code to do the reporting on the newer files but am not sure how to systematically go through all of the files and delete them based on their file date. I have already been pointed to the "FileTimeDate" function.