note 24348 added to function.touch

From: Date: Tue, 13 Aug 2002 19:31:07 +0000
Subject: note 24348 added to function.touch
Groups: php.notes 
Request: Send a blank email to php-notes+get-34954@lists.php.net to get a copy of this message
Neat little script that will give you a list of all modified files in a certain folder after a certain date: $filelist = Array(); $filelist = list_dir("d:\\my_folder"); for($i=0;$i<count($filelist);$i++){ $test = Array(); $test = explode("/",date("m/d/Y",filemtime($filelist[$i]))); //example of files that are later then //06/17/2002 if(($test[2] > 2001) && ($test[1] > 16) && ($test[0] > 5)){ echo $filelist[$i]."\r\n"; } clearstatcache(); } function list_dir($dn){ if($dn[strlen($dn)-1] != '\\') $dn.='\\'; static $ra = array(); $handle = opendir($dn); while($fn = readdir($handle)){ if($fn == '.' || $fn == '..') continue; if(is_dir($dn.$fn)) list_dir($dn.$fn.'\\'); else $ra[] = $dn.$fn; } closedir($handle); return $ra; } -- http://www.php.net/manual/en/function.touch.php http://master.php.net/manage/user-notes.php?action=edit+24348 http://master.php.net/manage/user-notes.php?action=delete+24348 http://master.php.net/manage/user-notes.php?action=reject+24348

« previous php.notes (#34954) next »