1

I want to get full path of all files of specific extension inside root folder, this is what i have try (currently only file names without full path):

xmls = r'C:\xmls'

included_extensions = ['xml']
file_names = [fn for fn in os.listdir(xmls) if any(fn.endswith(ext) for ext in included_extensions)]
petezurich
  • 7,683
  • 8
  • 34
  • 51
falukky
  • 984
  • 2
  • 11
  • 27

0 Answers0