So I'd say start with a cfdirectory of the whole directory, to get all the files. This returns a query object. You can then use this to do a query-of-queries on, e.g. based on your date criteria.
<cfset form.yearFrom = 2010>
<cfset form.yearTo = 2012>
<cfdirectory name="getAllFiles" directory="/your/folder/" type="file" filter="*.txt">
<cfquery name="getYearFiles" dbtype="query">
SELECT *
FROM getAllFiles
WHERE 1=0
<cfloop index="i" from="#form.yearFrom#" to="#form.yearTo#">
OR name like 'text#i#%'
</cfloop>
</cfquery>
<!--- loop over getYearFiles, read each file --->
<!--- if year = current year, just read 'text' --->
<cfif form.yearTo EQ year(now())>
...
</cfif>