Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @keyword('List Files Recursively')
- def list_files_rec_filtered(path, regexp_filter="^(?!.).+$"):
- file_list = []
- filename_filter = re.compile(regexp_filter)
- for root, dirs, files in os.walk(path, topdown=True):
- for file in files:
- if filename_filter.match(file):
- file_list.append(os.path.abspath(os.path.join(root,file)))
- return file_list
- ${files} = file_utils.List Files Recursively ${path} ${FILE_TYPES}
Add Comment
Please, Sign In to add comment