deltree function
Warren Postma
embed at NOSPAM.geocities.com
Mon Aug 28 11:41:44 EDT 2000
"Arkaitz" <abitorika at openworld.co.uk> wrote in message
news:39AA788D.6A556016 at openworld.co.uk...
> Hi All,
>
> Is there a deltree-like function in the Python standard library? I have
> been looking at os.removedirs(), but it won't delete non-empty
> directories. I'd like to delete a whole tree, with files and directories
> mixed, as rm -rf does in Unix. Any hint?
>
> Thanks in advance,
>
> Arkaitz
>
On unix I'd just shell out and execute "rm -rf". On windows, the same might
work, since you could always go get the rm.exe program from Microsoft's NT
Resource Toolkit.
Warren
More information about the Python-list
mailing list