You can add a small piece of friut which will help keep the flies in a central location that can be called a feeding station.
It should attract many of them but not usually all. The flies will be fine roaming around the tank.