Below is the python code:
def get_recursive_filelist(rootdir): outfiles = [] if os.path.isfile(rootdir): outfiles.append(rootdir) for (dir, _, files) in os.walk(rootdir): for f in files: path = os.path.join(dir, f) if os.path.exists(path): outfiles.append(path) return outfiles
No comments:
Post a Comment