Further to this query I actually hit the manuals and found that their
already was a walk function. My final solution was thus...
Please note it is heavily commented because I am a teacher and created
this for a student :-)
# Will create a listing in a file called dirlist.txt of all the files in
the fact that it fails shoul be due to some windows restriction about trash
& some hidden files,
to bypass that you can add a filter in here
def walk(dir):
for name in os.listdir(dir):
#the following line is the filter
if name != 'Trash can' or name != 'some hidden directory name':
On Thu, Jul 3, 2008 at 8:47 AM, Michael <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have modified an algorithm from the think like a python programmer book
> for traversing folders and printing the files in those folders. It works for
> my original purposes but I have a students that wants to use it to r
Hi
I have modified an algorithm from the think like a python programmer
book for traversing folders and printing the files in those folders. It
works for my original purposes but I have a students that wants to use
it to run from a root folder, problem is that it crashes on the
recycling bin