recursively remove all the directories and files which begin with '.'

J dreadpiratejeff at gmail.com
Fri May 14 11:01:22 EDT 2010


On Fri, May 14, 2010 at 10:53, albert kao <albertkao3 at gmail.com> wrote:
>
> C:\python>rmdir.py
> C:\test\com.comp.hw.prod.proj.war\bin
> ['.svn', 'com']
> d .svn
> dotd C:\test\com.comp.hw.prod.proj.war\bin\.svn
> Traceback (most recent call last):
>  File "C:\python\rmdir.py", line 14, in <module>
>    rmtree(os.path.join(curdir, d))
>  File "C:\Python31\lib\shutil.py", line 235, in rmtree
>    onerror(os.remove, fullname, sys.exc_info())
>  File "C:\Python31\lib\shutil.py", line 233, in rmtree
>    os.remove(fullname)
> WindowsError: [Error 5] Access is denied: 'C:\\test\
> \com.comp.hw.prod.proj.war\\bin\\.svn\\entries'
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

You don't have permissions to remove the subdir or file entries in the
.svn directory...

Maybe that file is still open, or still has a lock attached to it?



More information about the Python-list mailing list