Simple answer: Yes
You'd have to use either the [man]dir[/man] object or use a [man]fopen/man and [man]fread/man loop or two. Just look for files with a [man]filemtime/man or if you're not modifying the files ever, use [man]filectime/man to get the last modifed or created time.
Then if it's less than 60 days, go ahead and delete it. Something as simple an example i can give is:
function del60($path)
{
$dir = dir($path);
while(false != ($entry = $dir->read()))
{
if($entry == '.' || $entry == '..')
continue;
if(is_dir($path.'/'.$entry))
del60($path.'/'.$entry);
$limit = (60*60*24*60); // 60 days measured in seconds
if(filectime($path.'/'.$entry) < $limit)
{
if(filemtime($path.'/'.$entry) < $limit)
unlink($path.'/'.$entry);
}
}
$dir->close();
}
del60('Mail/a_directory');