We have had lots of flies and here is how we got rid of them:
I took a shallow container - (like a Fage yogurt carton) put in about 1/3 cup apple cider vinegar (you can also use another sweet vinegar like red wine - apple worked really well for me) - and top it off with about a tablespoon of dish soap, cover tightly with plastic wrap and then poke hole in the wrap. The flies are attracted to this because it smells like rotting / ripe fruit - they get trapped and meet their end. To ensure you get all the flies make sure your kitchen is as clear of dirty dishes, food left out, garbage, etc.
The first time I did this I got more than 10 flies overnight - we have none now, I saw one the other day after coming home with groceries, put out the trap and got it within hours!
Good luck - - or should I say "happy hunting"...