Re: Delete all files in DIR every 20 days
| From: | Robby Russell | Date: | Mon, 14 Feb 2005 16:51:51 +0000 |
| Subject: | Re: Delete all files in DIR every 20 days | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-208650@lists.php.net to get a copy of this message | ||
On Tue, 2005-02-15 at 02:12 +1030, Tim Burgan wrote:
> Hello,
>
> How can I delete ALL files within a specified directory every 20 days?
> Does anyone know of any code-snippets that are around at the moment that
> are able to do this? (And where I can find them?)
>
> Thanks
>
> Tim
>
What operating system?
In linux you'd use
rm -rf /path/to/dir
and add this to crontab.
-Robby
--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
* --- Now hosting Ruby on Rails Apps ---
****************************************/