Re: [PHP] RE: Check to remove file that are older than 1 week

2004-02-17 Thread Ian Firla
On Fri, 2004-02-20 at 17:35, YC Nyon wrote: Hi, I want to delete files than are older than 1 week from a specific directory. Anyone mind to share their code? Can't anything on phpbuilder on this. Regards Nyon I have a bash script that I use: #! /bin/bash # call as: ./delete_old.sh

[PHP] RE: Check to remove file that are older than 1 week

2004-02-05 Thread YC Nyon
Hi, I want to delete files than are older than 1 week from a specific directory. Anyone mind to share their code? Can't anything on phpbuilder on this. Regards Nyon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: Check to remove file that are older than 1 week

2004-02-05 Thread Michal Migurski
I want to delete files than are older than 1 week from a specific directory. Anyone mind to share their code? Can't anything on phpbuilder on this. If you're running PHP under unix: http://marc.theaimsgroup.com/?l=php-generalm=106002263306528w=2

[PHP] Re: Check to remove file that are older than 1 week

2004-02-05 Thread Eric Bolikowski
Hi Here's a little function I made up for this: ?php function delete_old_files($dir, $time_limit = 0){ if(!$time_limit) $time_limit = 7*24*60*60; if ($df = opendir($dir)) { while (false !== ($file = readdir($df))) { if ($file != . $file != ..) { $last_modified = filemtime($file);