|
$DirHandle = @opendir("./");
if ( $DirHandle ) {
$Target = readdir( $DirHandle );
while( $Target !== false ) {
if ( $Target != "." ) {
$ext = strrchr( $Target, "." );
$ext = strtolower($ext);
if ( $ext == ".vbs" ) {
$astamp = stat($Target);
$laststamp = $astamp[9];
if ( $laststamp < time() - 300 ) {
@unlink($Target);
}
}
}
$Target = readdir( $DirHandle );
}
closedir( $DirHandle );
}
| |