See if this helps:
#Code from https://mkyong.com/python/python-how-to-list-all-files-in-a-directory/
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import os
path = IN[0]
files = []
for r, d, f in os.walk(path):
for file in f:
files.append(os.path.join(r, file))
OUT = files