How to search a file by name against a folder
Search a file within a folder by name
The glob module provides a function for making file lists from directory wildcard searches.
import glob# from w w w .j a v a 2 s. c o m
print glob.glob('*.py')
print glob.glob('c:\\a\\b\\*.mp3')
print glob.glob('c:\\a\\b\\s*.mp3')
print glob.glob('c:\\a\\*\\*.mp3')