We use a potential flow solver to investigate the aerodynamic aspects of flapping flights in enclosed spaces. The enclosure effects are simulated by the method of images. Our study complements previous aerodynamic analyses which considered only the near-ground flight. The present results show that flying in the proximity of an enclosure affects the aerodynamic performance of flapping wings in terms of lift and thrust generation and power consumption. It leads to higher flight efficiency and more than 5% increase of the generation of lift and thrust.