Tap/bang container down onto a hard surface. All the flies fall to the bottom. Open lid, dump out as many as desired, bang container onto hard surface (or palm of hand) again to get the remaining flies back to the bottom allowing sufficient time to put top back on. (I am assuming these are flightless fruit flies - if they are blue bottles or house flies, putting into the fridge for a few minutes first works)