I had fungus knat problem in previous years because of my red worm bin but I had never house flies until I started to raise rabbits in my house 50 days ago. There are flyscreens in all my windows but somehow dozens of house flies apeared 10 days after I brought the rabbits. Their number increased, I tried sticky traps, bottle traps etc. and nothing worked. I have many kinds of insecticides and a large automatic sprayer for outdoor but I couldn't use it indoors because it is so powerfull that just a few seconds would be enough to spray a cup of insecticide. I could't use it, there are many plants in the house that I foraged for rabbits and many plants that in the process of drying. Also insecticides are not good for rabbits.
So I went old school and used a simple spray bottle, poured some insecticide in it, in my case benzyl benzoate. You can target the fly and nowhere else is effected. One by one I killed more than 100 flies within a week and my nightmare ended last week.