I need to perform some automated action on a set of XML files. I'm just learning Python so I've looked up for a similar SO answer and come up with this:
root_dir='/home/user/git/code'
for filename in glob.iglob(root_dir + '**/*.xml', recursive=True):
print(filename)
The problem with the above code is that it finds just the top XML file which is on '/home/user/git/code' and not all those nested under that folder. The flag 'recursive' is set to true so I wonder what could be wrong with it.... Any idea? Thanks