Having dealt with this a time or two, the best plan of action in my opinion is as follows.
Attach a blanket or large towel to two brooms, mops or anything with a long handle. You can use binder clips, hair clips or anything else as long is it secures it well.
I have attached a rudimentary drawing for further explanation.

Now that you have your net device, there are two options. If the bird or bat is flying in a predictable circle, you can stand beneath it and thrust the net device upward in front of it.
Or you can stand at one end of the room, with the net extended upwards and slowly walk toward the creature.
When the flying creature hits the towel or blanket, bring your arms together in front of you catching the bird or bat in the net. Quickly transport it outside and open the net up to set it free. Mission accomplished.
This is an effective safe way of handling the situation and the least likely to cause injury to the animal or yourself. Especially with bats that could bite etc.