[Tutor] Delete directories recursively

Kent Johnson kent37 at tds.net
Fri Jun 16 17:39:37 CEST 2006

Amresh Kulkarni wrote:
> Hi,
> I need to delete a directory and its sub directories. However all dir's, 
> sub dir;s and files have read only access. How do i do this efficeintly 
> using the os.walk command.
> I cannot run this command on the dir as it gives me an error due to the 
> read only attribute. Is there any other way to do this?

Maybe I'm missing something, but I don't understand how you expect to 
delete a directory if you don't have delete permission?


More information about the Tutor mailing list