def list_dir(CurPath=os.getcwd(),file_list=[]):
FileList=os.listdir(CurPath)
#print FileList
for File in FileList:
SubPath=CurPath+'\\'+File
if os.path.isdir(SubPath):
list_dir(SubPath,file_list)
else:
file_list.append(SubPath)
return file_list
用递归遍历所有文件夹,并返回文件路径