Batch file help

  • Thread starter Thread starter shallowz
  • Start date Start date
S

shallowz

To let know you I know very little about batch files
But I know a batch file will help in this situation
This is what I want to do

I want to be able to add
192.10.11.48 www.website.com
To the end of the hosts file in system 32

I want to do this to a couple of computers and I can’t replace the hosts
file so I need to add “192.10.11.48 www.website.com†to the end of the page

What are the codes I need to add to a patch file to do this?
 
shallowz said this on 1/7/2009 1:45 PM:
To let know you I know very little about batch files
But I know a batch file will help in this situation
This is what I want to do

I want to be able to add
192.10.11.48 www.website.com
To the end of the hosts file in system 32

I want to do this to a couple of computers and I can’t replace the hosts
file so I need to add “192.10.11.48 www.website.com†to the end of the page

What are the codes I need to add to a patch file to do this?

echo "192.10.11.48 www.website.com" >> %windir%\system32\drivers\etc\hosts


Thats all on one line if wordwrap kicks in.
 
that is the answer i was looking for and it worked
thank you very much for your help
 
Back
Top