There's lot of ways to deal with flies -- personally, I prefer to keep things as natural as possible.
There are tiny parasitic wasps that you can purchase (sometimes through a feed store) that will feed upon the fly larva, eliminating the hatch of adult flies.
I raise rabbits, and flies are a tremendous problem in a rabbit barn. Over the years I've used all the methods of controlling them -- sprays, traps, wasps, etc. But the best thing I ever found to eliminate the flies is imitation vanilla added to the drinking water at the rate of 1 tsp per gallon -- within 3 days, there was not a fly to be found in the barn. With vet's approval, I tried it for our Jersey and while it didn't work as well as for the rabbits, it did reduce the population. I now wipe her down every other day with imitation vanilla and that works!
It may sound expensive, but vanilla is available in half-gallon and gallon jugs, even in double and triple strength. Gallons can be ordered through a bakery. I buy by the half-gallon at Sam's ($3.50) and since I now buy no other pesticides, it's actually cheaper.
Ann Bledsoe -- Bledsoe's Bunnies
Breeder of Quality Satin Show Rabbits
Bledsoe's Bunnies Rabbitry