The first step is to make the structure as flyproof as possible by putting up screens or by caulking wherever the flies come in. Then spray liquid insecticide outside at strategic spots along the walls. This must be done by a professional toward mid-August before the flies start to work their way indoors.
It can also help to put sticky traps near windows and light sources. Pyrethrin-based aerosols like Maheu&Maheu Flying Insect Killer
can also lend a hand given their very fast-acting effect. You can also apply Maheu&Maheu Crawling Insect Killer
around windows because that is where the flies tend to cluster.Maheu&Maheu Insecticide Dust
is recommended for the attic and other hollow spaces, which are popular hiding places for the flies. Remember, however, that it is very important to vacuum up any dead flies because they can attract other pests, like the Larder Beetle.