Unfortunately you did not answer my question. It is important to know which file names you wish to exclude in order to know how to exclude them. Let's suppose you have the following rasters in a folder (see the list "rasters" in the code below, ending on band1.tif until band12.tif). You can use list comprehension to filter out the ones you don't need:
rasters = ['LC81360432015069LGN00_toa_band1.tif',
'LC81360432015069LGN00_toa_band2.tif',
'LC81360432015069LGN00_toa_band3.tif',
'LC81360432015069LGN00_toa_band4.tif',
'LC81360432015069LGN00_toa_band5.tif',
'LC81360432015069LGN00_toa_band6.tif',
'LC81360432015069LGN00_toa_band7.tif',
'LC81360432015069LGN00_toa_band8.tif',
'LC81360432015069LGN00_toa_band9.tif',
'LC81360432015069LGN00_toa_band10.tif',
'LC81360432015069LGN00_toa_band11.tif',
'LC81360432015069LGN00_toa_band12.tif']
chk4 = ['band{0}.tif'.format(i) for i in range(2, 8)]
rasters = [a for a in rasters if a[-9:] in chk4]
print rasters
This will yield:
['LC81360432015069LGN00_toa_band2.tif',
'LC81360432015069LGN00_toa_band3.tif',
'LC81360432015069LGN00_toa_band4.tif',
'LC81360432015069LGN00_toa_band5.tif',
'LC81360432015069LGN00_toa_band6.tif',
'LC81360432015069LGN00_toa_band7.tif']
... only the bands 2 until 7. This will only work if the assumption made before is true...
Kind regards, Xander