So I want to create my own batch file (.bat) which will edit a file by adding a line onto the bottom of it but not overwriting what is already in there. I have no experience writing in whatever language the .bat file requires (is it MS-DOS, or another language?), so guidance and patience is much appreciated. :)
What I want to do is edit the existing hosts file located at C:\WINDOWS\system32\drivers\etc\hosts, but not overwrite everything within it, just add a line to the bottom of it while keeping what is already there. Please could someone post the code that I would need to do this, and if possible explain the code to me bit by bit, as I have an interest in programming languages and would love to know what I am asking the browser to do, and how exactly this works. I've been online to find out how this is done, but I can't find anything that actually works for me.
Also, another question - can this same batch file that I am writing be used to edit the hosts file of any computer with the hosts file at that location? So, Windows XP, Vista, 7, and other OSes?