RyanJones describes the process quite well, here's some commands to start you out:
[man]opendir[/man] & [man]readdir[/man] or [man]glob[/man], [man]filectime[/man] or [man]filemtime[/man], and finally [man]unlink[/man]
Using the filemtime or filectime, the easiest way to go about this would be to get your starting date into a Unix timestamp (number of seconds since Unix epoch, Jan 1 1970 I believe) using a command such as [man]mktime[/man], then subtracting the Unix timestamp of the modified/created filetime from your genereated timestamp, and if the result is bigger than 606060 (timestamp is seconds, so 60 seconds 60 seconds = 1 day, 1 day 60 days) then delete ("unlink") the file.