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)

相关文章:

  • 2021-09-29
  • 2021-10-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
相关资源
相似解决方案