r j cried from the depths of the abyss...
> For deleting mails by time stamp in a directory. cd into directory. python
> >>>
>
>
> import os, time
>
> path = r"c:\tmp"
> now = time.time()
> for f in os.listdir(path):
> if os.stat(f).st_mtime < now - 2 * 86400:
> if os.path.isfile(f):
> os.remove(os.path.join(path, f))
>
That is a neat trick. Thanks!
Although I don't use this on mail, I do a similar thing from bash:
For just files, based on date(+14 days in this example)
find /mnt/backups/* -mtime +14 -exec rm {} \;
or
File & directories recursively:
find /mnt/backups/* -mtime +14 -exec rm -fr {} \;
or by time (minutes in this example)
find /var/www/htdocs/IT_Dept/srvrm_temp/Roseville -type f -mmin +1440
-exec rm {} \;
Enjoy!
Mr. B-o-B