Answers for "find all files in a directory with extension python"

5

find all files in a directory with extension python

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

find all files in a directory with extension python

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

Code answers related to "find all files in a directory with extension python"

Python Answers by Framework

Browse Popular Code Answers by Language