Possible Duplicate:
In Python, fastest way to build a list of files in a directory with a certain extension
I currently am using os.walk to recursively scan through a directory identifying .MOV files
def fileList():
matches = []
for root, dirnames, filenames in os.walk(source):
for filename in fnmatch.filter(filenames, '*.mov'):
matches.append(os.path.join(root, filename))
return matches
How can I extend this to identify multiple files, e.g., .mov, .MOV, .avi, .mpg?
Thanks.