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

2010-05-14 Thread albert kao
On May 14, 11:01 am, J wrote: > On Fri, May 14, 2010 at 10:53, albert kao 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

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

2010-05-14 Thread albert kao
How do I recursively remove all the directories and files which begin with '.'? My test program rmdir.py does not do the job yet. Please help. [code] #!c:/Python31/python.exe -u import os from shutil import * root = "C:\\test\\com.comp.hw.prod.proj.war\\bin" for curdir, dirs, files in os.walk(roo

use only files but ignore directories on Windows

2010-05-13 Thread albert kao
My program plan to use only files but ignore directories on Windows. I google but do not find some functions like bool isFile(string) bool isDirectory(string) Please help. -- http://mail.python.org/mailman/listinfo/python-list

Re: walk directory & ignore all files/directories begin with '.'

2010-05-13 Thread albert kao
On May 13, 3:10 pm, MRAB wrote: > albert kao wrote: > > I want to walk a directory and ignore all the files or directories > > which names begin in '.' (e.g. '.svn'). > > Then I will process all the files. > > My test program walknodot.py does n

walk directory & ignore all files/directories begin with '.'

2010-05-13 Thread albert kao
I want to walk a directory and ignore all the files or directories which names begin in '.' (e.g. '.svn'). Then I will process all the files. My test program walknodot.py does not do the job yet. Python version is 3.1 on windows XP. Please help. [code] #!c:/Python31/python.exe -u import os import