Answers for "python find files in a directory"

5

how to search for a specific file extension with python

import glob, os
os.chdir("/mydir")
for file in glob.glob("*.txt"):
    print(file)
Posted by: Guest on March-06-2020
2

python find specific file in directory

text_files = glob.glob(path + "/**/*.txt")
Posted by: Guest on October-08-2020

Code answers related to "python find files in a directory"

Python Answers by Framework

Browse Popular Code Answers by Language