You could always restrict file types in the alias instead of the search folder definition. The problem, as I see it, is that previously launched .txt file is added to launch history which is then evaluated in later searches. But then it is filtered only by entered search string (and not by search folder definition) and is therefore not excluded from the results as it should be.
C:\aaa $$1 | dosearch +aaa -.txt $$1
modifier keyword: aaa