Standard library function to remove folder with files and subfolders?

Philip Semanchuk philip at
Sat Sep 18 23:36:49 CEST 2010

On Sep 18, 2010, at 5:24 PM, python at wrote:

> Is there a standard library function to remove a folder that may
> contain files and subfolders? Or must I write a function that
> walks my folder's children and deletes all files/subfolders
> first, and then call os.removedirs()?

In Python 2.x:

Might have moved in Python 3.x.


More information about the Python-list mailing list