The last few years at our seasonal site we had serious fly problems. We started using Fly Traps, similar to
these. Just add a little water and flies flock to it after a few hours. These are used outside, not inside. After about a week it will stink to high heaven. We usually attach it to one of the stabilizer jacks. The ones we use say to throw them away after the water is gone, but there are usually so many flies that the water level is not visible. I usually throw them away after 2 weeks or so. They catch both flies and gnats.
For inside the RV, we have resorted to using Fly Tape a few times. Not attractive at all, but they do work. We'll usually put them next to a bowl of fruit and after a couple days, all the gnats and flies will be gone.
I have read lots of posts about using fans to keep flies away. That has not helped us at all. Our site gets pretty windy as we are right across from a farm. Rain and wind don't seem to keep them at bay. I have even resorted to take a hose to them and relentlessly spraying them down. It only keeps them away for a few minutes. I haven't found a bug spray that works. I've tried several that are suppose to kill flying insects, but no joy.
The traps are the best thing we have found.
-Michael