I found about half a dozen (1, 2, 3 etc.) questions about how to add lines to the Windows hosts file but none of them are easy to maintain if you want to frequently update multiple lines with a single batch file in which you can just replace the old lines with your new ones as a block and delete everything else inside the hosts file.
127.0.0.1 example1.com
127.0.0.1 example2.com
127.0.0.1 example3.com
127.0.0.1 example4.com
127.0.0.1 example5.com
I was hoping you guys can tell me what I missed, where to look or maybe even give me an example. I'd really appreciate your help.