The deployment of energy harvesting (EH) nodes for information relaying is an appealing solution for wireless sensor networks as EH nodes are self-sustainable without the need of fixed power chords or frequent battery replacement. In practice, the energy arrival rate and the energy storage at EH relays may be limited and thus an EH relay may not always be available to perform data relaying due to energy shortage. In this paper, we consider the relay selection problem in a wireless network where each relay harvests energy from the radio-frequency (RF) signal and stores the harvested energy in a finite battery. We propose the battery-aware relay selection (BARS) scheme, which jointly considers the channel condition and the battery status for choosing a single relay to assist information delivery. The outage probability of the proposed scheme is analyzed theoretically by modeling the evolution of the battery status as a Markov chain. Simulations are performed to validate the analysis accuracy. Through numerical results, we show that with the proposed BARS scheme, EH relays can achieve full diversity but not with the relay selection scheme considering channel condition only.