I do not have cattle, but do have goats. I have been sprinkling DE on the bedding to help cut down on flies, but I'm not to where I want to be yet on control.
I was at the Elaine Ingham seminar at Greg Judy's farm last week, and learned a TON. One of the things we discussed is that the flies are a symptom of our soil food web being out of balance. Specifically, things are anaerobic. We also went and looked at some of Greg's cattle, and like someone said upthread, he is trying to breed for an oily, slick cow that doesn't attract flies. One cow had a ton, and he said she is one of the first ones on the cull list. He also has hundreds of tree swallow houses. There were tree swallows everywhere, and he said that has also made a big difference.