How to get files in a directory, including all subdirectories

前端 未结 6 1477
耶瑟儿~
耶瑟儿~ 2020-12-04 12:45

I\'m trying to get a list of all log files (.log) in directory, including all subdirectories.

6条回答
  •  臣服心动
    2020-12-04 13:41

    Checkout Python Recursive Directory Walker. In short os.listdir() and os.walk() are your friends.

提交回复
热议问题