Append Text to a file
Posted on 2004-04-19
I am using Win NT and am trying to make a batch file which can append a a phrase to a file in my computer.
I need to append the line
10.12.13.14 <tab> website.com
to the end of a file called "hosts" (does not have any file extention), present in the folder "C:\WINNT\System32\drivers\etc\"
Also, if the above mentioned phrase already exixts in the file, the batch file should give a message to the user and exit automatically without making any changes.
I really dont have any experience in doing this. Please can someone help me with this.
Thanks in advance,