遍历制定目录下所有文件,制定目录,#_*_coding:u


#_*_coding:utf-8_*_import osimport globdef findall(folder):    '''遍历指定后缀文件'''    if os.path.exists(folder):        folder2 = glob.iglob(folder+'*.mp3')        for f1 in folder2:            print f1        folder1 = glob.iglob(folder+'*\\')        for f in folder1:            findall(f)if __name__ == '__main__':    findall('D:\\')

评论关闭