<Original message>
From: Julio Nobrega Trabalhando <[EMAIL PROTECTED]>
Date: Thu, Aug 30, 2001 at 12:56:38PM -0300
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] Delete files older than X seconds.

>   Hi All,
> 
>   Another doubt. How can I delete files older than X seconds from a given
> folder?
> 
>   At the on-line manual I could only find a contributed note about 'discover
> time of last modification' from a file under a folder.
> 
>   Any help is appreciated.
> 
> --
> 
> Julio Nobrega
> 
> A hora está chegando:
> http://toca.sourceforge.net

</Original message>

<Reply>

I don't exactly see any problem here. If you want files older than X
seconds, and you have a modification time... Then you can unlink()
them can't you?!
I think you pretty much found the solution yourself. But just in
case... Take a look at the following manual pages and create a
construction with them. I think these are all you need.

http://www.php.net/manual/en/function.opendir.php
http://www.php.net/manual/en/function.readdir.php
http://www.php.net/manual/en/function.closedir.php
(in order to scan your directory)

http://www.php.net/manual/en/function.stat.php
(in order to get the modification time)

Hope this helps... And if this wasn't the problem... Tell me/us!

</Reply>

-- 

* R&zE:


-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to