Did you actually READ my previous post that you replied to?...
On Wed, July 18, 2007 1:29 am, [EMAIL PROTECTED] wrote:
Ok thanks everyone...
I need to throw in a wildcard, how would I do that.. I have this so
far.
which dont work.
?
$filename = '/home/public_html/client/test/*.txt.asc';
] Unlink file older then 7 days
On Mon, July 16, 2007 8:40 am, Stut wrote:
Suhas Pharkute wrote:
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somefile.txt';
if (file_exists($filename) fileatime($filename)
(time()-(7*24*60*60)) )
{
unlink($filename);
}
Read docs!
You too
On Wed, 2007-07-18 at 07:29 +0100, [EMAIL PROTECTED] wrote:
I need to throw in a wildcard, how would I do that.. I have this so far.
which dont work.
foreach(glob(*.asc.txt) as $files)
{
unlink($files);
}
--Paul
All Email originating from UWC is covered by disclaimer
On Mon, July 16, 2007 8:40 am, Stut wrote:
Suhas Pharkute wrote:
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somefile.txt';
if (file_exists($filename) fileatime($filename)
(time()-(7*24*60*60)) )
{
unlink($filename);
}
Read docs!
You too! The OP wanted a way
How would I use fileatime to check if the file is older then 7 days?
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
--
[EMAIL PROTECTED] wrote:
How would I use fileatime to check if the file is older then 7 days?
You want filemtime not fileatime.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somefile.txt';
if (file_exists($filename) fileatime($filename) (time()-(7*24*60*60)) )
{
unlink($filename);
}
Read docs!
Suhas
On 7/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
How would I use fileatime to check if
Suhas Pharkute wrote:
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somefile.txt';
if (file_exists($filename) fileatime($filename)
(time()-(7*24*60*60)) )
{
unlink($filename);
}
Read docs!
You too! The OP wanted a way to check the age of all files. The
fileatime
-Original Message-
From: [EMAIL PROTECTED]
To: php-general@lists.php.net
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
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
Thanks
Chris
--
PHP General Mailing List (http://www.php.net/)
To
On Saturday 14 July 2007 9:16:06 pm [EMAIL PROTECTED] 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
11 matches
Mail list logo