In Windows, if I ran:
dir NP_???.LAS
I get 2 files:
NP_123.LAS
NP_1234.LAS
Using fmatch with NP_????.LAS mask I get only NP_1234.LAS, not NP_123.LAS.
Below, the code I´m running:
def FindFiles(directory, pattern):
flist=[]
for root, dirs, files in os.walk(directory):
for filename in fnmatch.filter(files, pattern):
flist.append(os.path.join(root, filename))
return flist
It´s possible to change this to get the same file list as dir command, using only one pattern?