RE: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Torsten Rosenberger
Hello take a look a the Pear File_Find class require_once 'File/Find.php'; $fs = new File_Find; $data = $fs->maptree('my_dir'); $data[0] contains all directorys $data[1] all files $ok = 0; $err = 0; foreach ($data[1] as $key) { if (unlink($k

Re: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread John Nichel
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 Write a script that will delete them, and set the script to run on

Re: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Robby Russell
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 oper

Re: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Greg Donald
On Tue, 15 Feb 2005 01:22:42 +1030, Tim Burgan <[EMAIL PROTECTED]> wrote: > 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?) You can put a tmp file i

RE: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Mikey
> 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 Sounds more like a job for cron than for PHP - "man crontab" should set you

RE: [PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Jay Blanchard
[snip] 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?) [/snip] Create a script that deletes files in the directory and then CRON it. http://www.unixge

[PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Tim Burgan
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] Delete all files in DIR every 20 days

2005-02-14 Thread Tim Burgan
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p