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
  • 9,280
  • 9
  • 43
  • 57
falukky
  • 1,099
  • 2
  • 14
  • 34

0 Answers0