My blood is like sweet candy to mosquitos, so I got something called a Skeeter Bag. It's a mesh cone that clips onto a box fan. The idea is that I hang out by the fan and as the mosquitos come to bite me they get pulled into the fan, and cannot crawl out against the wind. Maybe you could use something like that? If they're tiny little flies they may be fruit flies, which would be a little too small to get caught in the mesh (probably). You might be able to fabricate something like the bag and see if it works. Just put something delicious by the suck side of the fan...
One other thing that I've done is to take a plastic soda bottle, and cut off the top right where it starts to narrow. Turn that upside down so that the mouth faces into the remains of the bottle, then tape it up. Drop in something delicious like sugar water. It's much easier for them to get in than to get back out. There's a picture of it at
Homemade Fly Traps - sugar water, yeast et c seems to draw them.
But yeah, get any trash, old fruit, et c out first.
