[Tutor] select particular directories and files
questions.anon at gmail.com
Tue Aug 30 01:52:42 CEST 2011
I am trying to select particular files within a particular subdirectory, I
have been able to do both but not together!
When I try to select my files within the dir loop nothing comes up, but when
I leave the files outside the dir loops it selects all the files
not just the ones in the dirs I have selected.
The code I am using is:
for (path, dirs, files) in os.walk(MainFolder):
for dir in dirs:
print "selected directories are:",dir
for ncfile in dir:
print "ncfiles are:", ncfile
Any feedback will be greatly appreciated!!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor