Deleting Directories

336699 googlegroups.20.meeper at spamgourmet.com
Fri May 21 16:45:47 EDT 2004


Look at the docs for the shutil module.  It has a function called
rmtree() that will do what you want.

"Laura McCord" <Laura.McCord at doucet-austin.com> wrote in message news:<mailman.138.1085151361.6949.python-list at python.org>...

> I want to delete folders in my "/var/www/html/da" directory that are
> over 1 day old.
> 
> But, when I find the folder a simple rmdir() command does not work
> because the directory is not empty. What else do I need to do to delete
> a directory that contains content?



More information about the Python-list mailing list