path is the location of the files you want to choosematch is a string that is put into re.compile(match) so that only filenames that match that re are included in the listrecursive is a boolean which when set to True allows all the files in subdirectories of path to be included in the list