Re: [PHP] Unlink file older then 7 days

2007-07-20 Thread Richard Lynch
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';

Re: [PHP] Unlink file older then 7 days

2007-07-18 Thread chris
] 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

Re: [PHP] Unlink file older then 7 days

2007-07-18 Thread Paul Scott
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

Re: [PHP] Unlink file older then 7 days

2007-07-17 Thread Richard Lynch
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

Re: [PHP] Unlink file older then 7 days

2007-07-16 Thread chris
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 --

Re: [PHP] Unlink file older then 7 days

2007-07-16 Thread Stut
[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

Re: [PHP] Unlink file older then 7 days

2007-07-16 Thread Suhas Pharkute
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

Re: [PHP] Unlink file older then 7 days

2007-07-16 Thread Stut
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

Re: [PHP] Unlink file older then 7 days

2007-07-16 Thread Ray
-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

[PHP] Unlink file older then 7 days

2007-07-14 Thread chris
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

Re: [PHP] Unlink file older then 7 days

2007-07-14 Thread Ray
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