When you call "files = file_search('*_000001_g.tif', count=count, /fold_case)" you are overwriting results you got from the first call. Instead, you can generate a list and then add the files returned from file_search to it:
files = list()
cd, 'mydir'
files.add, file_search('*_000000_g.tif', count=count, /fold_case)
cd, 'other_mydir'
files.add, file_search('*_000000_g.tif', count=count, /fold_case)
files_array = files.ToArray(DIMENSION=1)
|