When one changes a diaper of a baby one should do it away from seforim etc. How far away do seforim and tefillin have to be? Is 4 amos enough or does the entire room become like a bathroom and therefore one would need change the baby away from a room with any seforim. Also, if one were to cover seforim would that help and allow a diaper changing even within 4 amos?
it is permitted to change a baby even in front of seforim.
Magen Avraham (Orach Chaim 45:2) writes that it is prohibited to stand naked in front of sefarim, a halachah he bases on a Gemara (Shabbos 120b), and on the laws of mezuzah. However, we find in the laws of mezuzah that only a room wheich is used on a regular basis in such a manner, such as a bathhouse, is exempt from mezuzah, whereas a room in which people are only sometimes naked is obligated in mezuzah, indicating that there is no actual prohibition of appearing naked in front of themezuzah. This proof can be deferred, because the mezuzah can be placed on the other side of the door.
However, there is no prohibition with regard to babies, for Rema states (Orach Chaim 75:4) that it is permitted (according to some, whose ruling Rema follows) to recite krias shema in front of a child’s erva, a ruling based on Rosh and Rabbeinu Yonah. Mishnah Berurah (75:23) rules in accordance with Rema, stating that the respective ages are up to 9 years old for a boy, and 3 for a girl (according to the Vilna Gaon, the ages are higher).
Although some are stringent (Chayei Adam 4:1; Kitzur Shulchan Aruch 5:12), there is even more room for leniency with regard to sefarim, for there is an element of doubt as to whether today’s sefarim they possess the kedushah of handwritten texts (this is a dispute betweenChavas Yair and Taz, see Mishnah Berurah 40:4, and see also Minchas Yitzchak2:96-97 and Har Tzvi, YD 143). This is all the more true of modern publishing techniques which do not involve any human input (Maharsham 3:357).
Furthremore, some authorities maintain that the sefer’s binding is considered a partition (see Daas kedoshim YD 285; Kaf Ha-Chaim 40:14; Mishnah Berurah 40:4; Pri Megadim 40:2; Maharam Shik OC 94; Maharsham (Daas Torah) 240:6). In addition, books are often placed on a shelf that is above 10 tefachim from the ground, which constitutes a partition according to some authorities (see Maharam Shik, OC 94).
Therefore, as Rav Pesach Eliyahu Falk rules (Machazeh Eliyahu 5), one can certainly be lenient with regard to changing babies in front of sefarim.