-----Original Message-----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Date: Mon, 16 Jul 2007 14:25:47 +0100
Subject: Re: [PHP] Unlink file older then 7 days
> How would I use fileatime to check if the file is older then 7 days?
>
>
>
>
something like:
$access = fileatime (c:\path\to\file);//assuming windows server
if ((time()-$access)>(7*24*60*60)){
do whatever with old files
}
off the top of my head.
There are other ways to do it.
Ray
>
> >> 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
> >>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php