If you want to get rid of flies, find (or buy online) some fly agaric mushrooms (Amanita muscaria. Quite unmistakeable, bright red cap covered in white warts, white gills, stem with annulus, no volva, but the base of the stipe is enlarged and bulbous.
Boil them in milk, leave the mixture in a bowl near the flies. They are attracted to a compound in the mushrooms, go to feed, and are poisoned, intoxicated by the muscimol content they fall into the milk, drown and die.
I used this recently when I had a bluebottle in my bedroom that I couldn't catch and release. Tried for ages, but I just couldn't catch the little fucking shit.
It isn't named the fly agaric for nothing. Very effective way to get rid of flies.