Re: Unlink file older then 7 days
| From: | Ray | Date: | Sun, 15 Jul 2007 04:03:51 +0000 |
| Subject: | Re: Unlink file older then 7 days | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258874@lists.php.net to get a copy of this message | ||
On Saturday 14 July 2007 9:16:06 pm chris@aquanuke.com wrote:
> I have a directory with .txt and .txt.asc files.
>
> What I want to do is..
>
> Check the age of all files ending in .txt.asc
>
> and if the file *.txt.asc is older then 7 days
>
> delete thatfile.txt.asc and also thatfile.txt
>
look at these functions (and also related functions, the bar on the right hand
side):
http://ca3.php.net/manual/en/function.opendir.php
http://ca3.php.net/manual/en/function.fileatime.php
http://ca3.php.net/manual/en/function.unlink.php
HTH
Ray
>
> Thanks
> Chris