Re: Purging old files from directories
| From: | Marek Kilimajer | Date: | Fri, 01 Aug 2003 14:06:42 +0000 |
| Subject: | Re: Purging old files from directories | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157938@lists.php.net to get a copy of this message | ||
Verdon vaillancourt wrote:
Hi :) I need to write a script that will scan/read a given directory's contents and delete files older than a certain date. Ideally, this will be a script that runs via cron once a week and deletes all files it finds in the directory older than 2 weeks from the current date. I do currently have scripts running via cron and that's no problem. I'm not sure where to begin with the other components Begin in the manual:Directory functions Filesystem functions - filemtime()
I'm not looking to be spoon-fed, but I was hoping that someone could point me in the right direction to start researching. Best regards, Verdon