Mick,
Are you trying to crawl through a folder looking for files and their path? I use the following to reclusively look for a particular file type in a folder and subfolders. The function call below returns a list containing the folder and filename for all "txt" files in a directory and its subdirectors.
import os, fnmatch
def locate(pattern, root=os.curdir):
for folder, subs, files in os.walk(root):
for filename in fnmatch.filter(files, pattern):
yield os.path.join(folder, filename)
filelist = locate('*.txt', r'D:\path')