遍历取出指定文件夹下所有的文件
rootdir='D:\\icon集合\\icon集合'
def listAllFiles(rootPath):
list=os.listdir(rootPath)
for i in range(0,len(list)):
path=os.path.join(rootPath,list[i])
if os.path.isfile(path):
print(path)
elif os.path.isdir(path):
listAllFiles(path)
listAllFiles(rootdir)