[BangPypers] remove svn checkout folder
Nitin Kumar
nitin.nitp at gmail.com
Sun Oct 23 20:20:45 CEST 2011
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 <
shashidhar85 at gmail.com> 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
> shashidhar85 at gmail.com
> +919449073835
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
--
Nitin K
More information about the BangPypers
mailing list