import os
dest = 'O:\\OPO\\PFR\\'
filelist = open('filelist.lst', 'w')
os.chdir(dest)
for root, dirs, files in os.walk("."):
for filenames in files:
if filenames.endswith(".xml"):
filelist.write(dest + filenames + '\n')
filelist.close()