I'm not sure I understand your first question but checkout the " glob "
module.  Sounds like it may help.

Here is how you could get the folders and filenames

import os

list = os.walk("C:\python24\Tools")
for file in list:
    folderlist = os.path.split(file[0])
    print "****************Folder***************"
    print folderlist[1]
    print "====================================="
    print
    print "****************Files*****************"
    print file[2]
    print "====================================="

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to