There are .svn hidden files which create this error. Your need to use: shutil.rmtree(path,ignore_errors=True)
Thanks Nitin K On Fri, Oct 21, 2011 at 12:37 PM, Shashidhar Paragonda < [email protected]> wrote: > Dear Python hackers > > >> I checkout folder from repository to sat c:/MY/Application/TEMP > folder (TEMP folder i create) > >> I read a file from destination folder and perform some task and > close it > >> Now after performing task I need to delete entire checkout > folder from TEMP > >> I tried first changing the mod of respective folder using > *os.chmod(path/to/folder, > 0666) > >>* Then i tried *shutil.rmtree(path/to/folder/) but here I am > facing permission denied error > > code : os.chmod(path/to/folder, 0777) > if os.access(path/to/folder, os.R_OK): > shutil.rmtree(path/to/folder/) > is there any problem in this code or which is best solution for the > above requirement. > * > Thank you for help in advance. > > -- > ----------------------------------- > Regards, > > Shashidhar N.Paragonda > [email protected] > +919449073835 > _______________________________________________ > BangPypers mailing list > [email protected] > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
