WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   Älteste Datei auslesen (http://www.wcm.at/forum/showthread.php?t=98907)

pong 04.06.2003 00:01

Älteste Datei auslesen
 
Hallo!

Gibt es eine Möglichkeit, das letzte Änderungsdatum einer DAtei in verschiedenen Subdirectories zu suchen?

Egal ob php oder Perl oder sonstwas, einfach nur schnell

pong

_m3 04.06.2003 00:30

perldoc File::Find
perldoc -f stat

AlexanderFX 04.06.2003 14:05

da kiannst mal schaun:

http://de3.php.net/manual/de/function.getlastmod.php

http://de3.php.net/manual/de/function.filectime.php

http://de3.php.net/manual/de/function.filemtime.php

z.B:

PHP-Code:

<?php
// Gibt z.B. aus:  somefile.txt was last modified: December 29 2002 22:16:23.

// $dir = "test";
$file 'somefile.txt';
if (
file_exists(/* $dir . "/" . */$file)) {
    echo 
"$file was last modified: " date ("F d Y H:i:s."filemtime($file)); // wenn du sie in an unterordner hast: filemtime($dir."/".$file);
}
?>



Alle Zeitangaben in WEZ +2. Es ist jetzt 23:11 Uhr.

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag